summarylogtreecommitdiffstats
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
parent1d57db8b726b0b3ae5970517ddb29743a3bd2028 (diff)
downloadaur-python-snuggs.tar.gz
Apply patch
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD31
2 files changed, 26 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e78619e932db..eaa0a0fa9182 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,21 @@
pkgbase = python-snuggs
pkgdesc = Snuggs are s-expressions for Numpy
pkgver = 1.4.7
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/mapbox/snuggs
arch = any
license = MIT
checkdepends = python-pytest
checkdepends = python-hypothesis
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
depends = python-numpy
depends = python-pyparsing
source = snuggs-1.4.7::https://github.com/mapbox/snuggs/archive/1.4.7.tar.gz
+ source = non-strict.patch::https://github.com/mapbox/snuggs/pull/28.patch
sha512sums = c1f40e521d1b0cf15075b22b04000c74ecbd0522cdd820b8c159aac812924d877349b3f3bca93b09eed5b025a34c26665a41c7a52a8145419558b115cf8ef361
+ sha512sums = a804e7d9a7f2d4209c7ef075f3f9144fd380737c90d43fcd9e9138187f125c8b7bd4316c56a7fc4a658b9e3c1398390d05fd606a8cb95842e774c62731405cfa
pkgname = python-snuggs
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}"
}