summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2022-12-17 17:03:19 +0100
committerCarl Smedstad2022-12-17 17:03:34 +0100
commitbc33ab7680f1f43e59d414637a5205e5f8cd9530 (patch)
treebcc06d5b2bb04fc601b620cad55f9ae7455bf334
parent889e44bf8d24362c05300297ae1f8d321b3a8e66 (diff)
downloadaur-bc33ab7680f1f43e59d414637a5205e5f8cd9530.tar.gz
PEP 517 based installation
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD40
2 files changed, 28 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8fe3b52ba9e7..421c25a75f86 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 4535da0aea0c..476ee3c7a771 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}