aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-cffi/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/py3-cffi/APKBUILD')
-rw-r--r--main/py3-cffi/APKBUILD43
1 files changed, 28 insertions, 15 deletions
diff --git a/main/py3-cffi/APKBUILD b/main/py3-cffi/APKBUILD
index 1add5261a6a..01e4692e1b0 100644
--- a/main/py3-cffi/APKBUILD
+++ b/main/py3-cffi/APKBUILD
@@ -1,39 +1,52 @@
# Contributor:
-# Maintainer:
+# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=py3-cffi
_pkgname=cffi
-pkgver=1.14.5
-pkgrel=2
+pkgver=1.16.0
+pkgrel=1
pkgdesc="Foreign function interface for calling C code from Python3"
url="http://cffi.readthedocs.org/"
arch="all"
license="MIT"
depends="py3-cparser"
-makedepends="python3-dev py3-setuptools libffi-dev"
+makedepends="
+ libffi-dev
+ python3-dev
+ py3-gpep517
+ py3-setuptools
+ py3-wheel
+ "
checkdepends="py3-pytest"
+subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
- musl-compat.patch"
+ fix-setuptools-deprecation.patch
+ "
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-cffi" # Backwards compatibility
provides="py-cffi=$pkgver-r$pkgrel" # Backwards compatibility
-case "$CARCH" in
- ppc64le|x86|aarch64) options="!check" # test failures
-esac
-
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- python3 setup.py build_ext -i
- python3 -m pytest --disable-pytest-warnings c/ testing/ || true
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+
+ PYTHONPATH="$(echo "$builddir"/build/lib.linux-*)" \
+ .testenv/bin/python3 -m pytest \
+ --disable-pytest-warnings testing/
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
-sha512sums="7428b3f6e4ee9f3b91011e43304dd63e5cc48479120ae58298c646c1ec1f5c24525d5f08655a7fed70c5fad7ae0c2e0539e512b5fa49d2bc57669c4ab703cc2a cffi-1.14.5.tar.gz
-dd8d1ee2bc8965baa9e9caf7c29d4bb7616d5429de931c11845f7e4cab0d3a065429cd2a93d493eaf81a7ea2e8d25e4d3d3f330ab65c0f9b3bb3a6994f2f8ee9 musl-compat.patch"
+sha512sums="
+fd2588115092202aa9289c9d4e0a0b3e264b5e9ec1dc192950f31aeb412fd9f9d4e5c96a3f9c6762987b58ccc1e229f2012ddda89211797104df672d8ed51152 cffi-1.16.0.tar.gz
+cf6fd617176abb034d2f781712ffecff440202b6d21868a02857e9a47748c76b0cf5712907d45fc05b745a18e9b5dd603b32771912d3bd2bd594421a7f607297 fix-setuptools-deprecation.patch
+"