diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 21 insertions, 18 deletions
@@ -1,28 +1,31 @@ -# Maintainer: Sophie Tauchert <sophie@999eagle.moe> - -_pkgname=timeago -pkgname=python-${_pkgname} -pkgver=1.0.10 -pkgrel=1 -pkgdesc="Very simple python library, used to format datetime with \`***time ago\` statement." +# Maintainer: Mark Wagie <mark dot wagie at proton dot me> +# Contributor: Sophie Tauchert <sophie@999eagle.moe> +pkgname=python-timeago +_name=${pkgname#python-} +pkgver=1.0.16 +pkgrel=3 +pkgdesc="Simple library used to format datetime with \`***time ago\` statement." arch=('any') url="https://github.com/hustcc/timeago" license=('MIT') depends=('python') -makedepends=('python-setuptools') -provides=() -source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz" - "https://raw.githubusercontent.com/hustcc/timeago/${pkgver}/LICENSE") -sha256sums=('1e26ed34cc1fdcdbb949a0d9603a78d9b794ec1ec2a6179a13466596cbdc2320' - 'e2a15cd0b56cfffbb99e27caeb87afe58ff78097d9c3bd3aea2a251145479912') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') +source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz") +sha256sums=('7b54b88b3d0566cbf01ca11077dad8f7ae07a4318479e3d1b30feebe85f7137f') build() { - cd "${_pkgname}-$pkgver" - python setup.py build + cd "$_name-$pkgver" + python -m build --wheel --no-isolation +} + +check() { + cd "$_name-$pkgver" + python test/testcase.py } package() { - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - cd "${_pkgname}-$pkgver" - python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + cd "$_name-$pkgver" + python -m installer --destdir="$pkgdir" dist/*.whl + + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" } |