aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-cffi/APKBUILD
blob: 0d5de3e6199cae8d85abcb6debd4b88f1c038ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Contributor:
# Maintainer:
pkgname=py3-cffi
_pkgname=cffi
pkgver=1.14.0
pkgrel=2
pkgdesc="A 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"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	musl-compat.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
}

check() {
	python3 setup.py build_ext -i
	python3 -m pytest --disable-pytest-warnings c/ testing/ || true
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="4c5451eeede1d48a8f4b40e25b845ad1863b8bf3bd39624e6c693c2800d89a13efedc4c43b37e317a035613bffc2e3fd5f7e583c46cb283cb5cb930356f86253  cffi-1.14.0.tar.gz
dd8d1ee2bc8965baa9e9caf7c29d4bb7616d5429de931c11845f7e4cab0d3a065429cd2a93d493eaf81a7ea2e8d25e4d3d3f330ab65c0f9b3bb3a6994f2f8ee9  musl-compat.patch"