summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarlos Aznarán2023-11-25 13:05:44 -0500
committerCarlos Aznarán2023-11-25 13:05:44 -0500
commit792578f0f545218bd1eda61fe576fe87ef141fac (patch)
treeb5c646185041a657dfac66579aa0b4d9bd030f93 /PKGBUILD
parent1d57db8b726b0b3ae5970517ddb29743a3bd2028 (diff)
downloadaur-python-snuggs.tar.gz
Apply patch
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD31
1 files changed, 20 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9f6ce0e76273..7fe42245d014 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,29 +3,38 @@
_base=snuggs
pkgname=python-${_base}
pkgver=1.4.7
-pkgrel=3
+pkgrel=4
pkgdesc="Snuggs are s-expressions for Numpy"
url="https://github.com/mapbox/${_base}"
license=(MIT)
-arch=('any')
+arch=(any)
depends=(python-numpy python-pyparsing)
-makedepends=(python-setuptools)
+makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest python-hypothesis)
-source=(${_base}-${pkgver}::${url}/archive/${pkgver}.tar.gz)
-sha512sums=('c1f40e521d1b0cf15075b22b04000c74ecbd0522cdd820b8c159aac812924d877349b3f3bca93b09eed5b025a34c26665a41c7a52a8145419558b115cf8ef361')
+source=(${_base}-${pkgver}::${url}/archive/${pkgver}.tar.gz
+ non-strict.patch::${url}/pull/28.patch)
+sha512sums=('c1f40e521d1b0cf15075b22b04000c74ecbd0522cdd820b8c159aac812924d877349b3f3bca93b09eed5b025a34c26665a41c7a52a8145419558b115cf8ef361'
+ 'a804e7d9a7f2d4209c7ef075f3f9144fd380737c90d43fcd9e9138187f125c8b7bd4316c56a7fc4a658b9e3c1398390d05fd606a8cb95842e774c62731405cfa')
+
+prepare() {
+ cd ${_base}-${pkgver}
+ patch -p1 -i ../non-strict.patch
+}
build() {
- cd "${_base}-${pkgver}"
- python setup.py build
+ cd ${_base}-${pkgver}
+ python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
- cd "${_base}-${pkgver}"
- python -m pytest
+ cd ${_base}-${pkgver}
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer dist/*.whl
+ test-env/bin/python -m pytest
}
package() {
- cd "${_base}-${pkgver}"
- PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+ cd ${_base}-${pkgver}
+ PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}