mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-02 20:42:43 +00:00
apkbuild-pypi.in: use gpep517 in template
copied from `newapkbuild.in`, should work even without a `pyproject.toml` due to the `setuptools.build_meta:__legacy__` backend
This commit is contained in:
parent
4a55e30881
commit
ad9324fd52
@ -14,7 +14,7 @@ my %pkgmap = ();
|
||||
my %licenses = ();
|
||||
|
||||
my $template = <<'EOF';
|
||||
# Automatically generated by apkbuild-pypi, template 3
|
||||
# Automatically generated by apkbuild-pypi, template 4
|
||||
[% authors %]
|
||||
pkgname=[% pkgname %]
|
||||
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
|
||||
@ -27,26 +27,27 @@ replaces="[% replaces %]"
|
||||
url="http://packages.python.org/pypi/[% pkgreal %]"
|
||||
arch="noarch"
|
||||
license="[% license %]"
|
||||
checkdepends="python3-dev"
|
||||
makedepends="py3-setuptools"
|
||||
makedepends="py3-gpep517 py3-setuptools py3-wheel"
|
||||
checkdepends="py3-pytest"
|
||||
subpackages=""
|
||||
source="[% source %]"
|
||||
builddir="$srcdir/$_pkgreal-$pkgver"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 setup.py test
|
||||
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
||||
.testenv/bin/python3 -m installer .dist/*.whl
|
||||
.testenv/bin/python3 -m pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
PYTHONPATH=$pkgdir$(python3 -c "import site; print(site.getsitepackages()[0])") \
|
||||
python3 setup.py install \
|
||||
--prefix=/usr \
|
||||
--root="$pkgdir" \
|
||||
--single-version-externally-managed
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user