aports/main/py3-packaging/APKBUILD

47 lines
1.4 KiB
Text

# Contributor: Breno Leitao <breno.leitao@gmail.com>
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=py3-packaging
_pkgname=packaging
pkgver=25.0
pkgrel=0
pkgdesc="Core utilities for Python3 packages"
options="!check" # Requires py3-pytest which requires py3-setuptools
url="https://pypi.org/project/packaging"
arch="noarch"
license="Apache-2.0 AND BSD-2-Clause"
depends="python3 py3-parsing"
makedepends="py3-flit-core py3-gpep517"
# disable check to break circular dep with py3-setuptools
checkdepends="py3-pytest py3-pretend"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/p/packaging/packaging-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-packaging" # Backwards compatibility
provides="py-packaging=$pkgver-r$pkgrel" # Backwards compatibility
[ "$CARCH" = s390x ] && options="$options !check" # fails a lot
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest \
--ignore=tests/test_tags.py \
--deselect \
tests/test_manylinux.py::test_is_manylinux_compatible_old
}
sha512sums="
0672602d2e18c3aee71b3e567b0de572bc8613ee3d24a79a655ded23ac08ec4582193225bc0c0ea390ed81cf5efbb46e8afbe0798d14f2235f811f263c25728c packaging-25.0.tar.gz
"