projects/aports·blob master · refs

40 lines · 1.2 KiB

1# Automatically generated by apkbuild-pypi, template 4
2# Contributor: Niklas Meyer <[email protected]>
3# Maintainer: Wen Heping <[email protected]>
4pkgname=py3-python-iptables
5#_pkgreal is used by apkbuild-pypi to find modules at PyPI
6_pkgreal=python_iptables
7pkgver=1.2.0
8pkgrel=2
9pkgdesc="Python bindings for iptables"
10url="https://pypi.org/project/python-iptables/"
11arch="all"
12license="Apache-2.0"
13depends="iptables"
14makedepends="py3-gpep517 py3-setuptools py3-wheel"
15checkdepends="py3-pytest"
16subpackages="$pkgname-pyc"
17source="https://files.pythonhosted.org/packages/source/p/python-iptables/python_iptables-$pkgver.tar.gz"
18builddir="$srcdir/$_pkgreal-$pkgver"
19options="!check" #needs iptables for check
20
21build() {
22 gpep517 build-wheel \
23 --wheel-dir .dist \
24 --output-fd 3 3>&1 >&2
25}
26
27check() {
28 python3 -m venv --clear --without-pip --system-site-packages .testenv
29 .testenv/bin/python3 -m installer .dist/*.whl
30 .testenv/bin/python3 -m pytest
31}
32
33package() {
34 python3 -m installer -d "$pkgdir" \
35 .dist/*.whl
36}
37
38sha512sums="
39434dbb756d6cc3e5b02e30cf1c806d211771227f21736f4f3f63551b725fbca6a347377c6005297d5b5266167f84e681468172184e83a68caacbed0423a76b84 python_iptables-1.2.0.tar.gz
40"