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