diff options
author | Carl Smedstad | 2022-12-17 17:03:19 +0100 |
---|---|---|
committer | Carl Smedstad | 2022-12-17 17:03:34 +0100 |
commit | bc33ab7680f1f43e59d414637a5205e5f8cd9530 (patch) | |
tree | bcc06d5b2bb04fc601b620cad55f9ae7455bf334 | |
parent | 889e44bf8d24362c05300297ae1f8d321b3a8e66 (diff) | |
download | aur-bc33ab7680f1f43e59d414637a5205e5f8cd9530.tar.gz |
PEP 517 based installation
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 40 |
2 files changed, 28 insertions, 22 deletions
@@ -1,15 +1,15 @@ pkgbase = proselint pkgdesc = A linter for prose pkgver = 0.13.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/amperser/proselint arch = any license = BSD - checkdepends = python-mock - checkdepends = python-nose checkdepends = python-pytest - makedepends = python-setuptools - makedepends = python-dephell + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + makedepends = python-poetry depends = python-click depends = python-future depends = python-six @@ -3,42 +3,48 @@ # Contributor: Shane Stone <shanewstone at gmail> pkgname=proselint +_name=${pkgname#python-} pkgver=0.13.0 -pkgrel=1 +pkgrel=2 pkgdesc='A linter for prose' arch=('any') url="https://github.com/amperser/proselint" license=('BSD') -depends=('python-click' 'python-future' 'python-six') -makedepends=("python-setuptools" "python-dephell") -checkdepends=('python-mock' 'python-nose' 'python-pytest') -conflicts=('python-proselint') -replaces=('python-proselint') +makedepends=( + python-{build,installer,wheel} + python-poetry +) +checkdepends=(python-pytest) +depends=( + python-click + python-future + python-six +) +conflicts=(python-proselint) +replaces=(python-proselint) + source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz") sha512sums=('31804ad7ee90a3e250337c2c6171b6ef7bbdb0a720ac0edff98c6b774001fa503db48597fda84eb108fe97ce943ef45caa53b160084087cbf2b1b564e84fb7cb') -prepare() { - cd "$pkgname-$pkgver" - - dephell deps convert --from pyproject.toml --to setup.py -} +_archive="$_name-$pkgver" build() { - cd $pkgname-$pkgver + cd "$_archive" - python setup.py build + # Due to a bug in poetry when there is a nesting of git directories + # See https://github.com/pypa/build/issues/384 for more info + GIT_CEILING_DIRECTORIES="$PWD/.." python -m build --wheel --no-isolation } check() { - cd $pkgname-$pkgver + cd "$_archive" pytest } package() { - cd $pkgname-$pkgver + cd "$_archive" - export PYTHONHASHSEED=0 - python setup.py install --skip-build --root="$pkgdir" --optimize=1 + python -m installer -d "$pkgdir" dist/*.whl install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |