diff options
author | Claudia Pellegrino | 2024-04-28 00:53:06 +0200 |
---|---|---|
committer | Claudia Pellegrino | 2024-04-28 01:14:42 +0200 |
commit | 5598333415f33eec37be6e426dd1cf88793e331f (patch) | |
tree | 3d201ec032aa22cce4bcca02399aec5b806772c0 /PKGBUILD | |
parent | 87f4f2877604153a60f4fbab3c341cc1a8ebbd2e (diff) | |
download | aur-distro-info.tar.gz |
Use PEP 517 for building
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 30 |
1 files changed, 21 insertions, 9 deletions
@@ -2,14 +2,26 @@ # Contributor: Johannes Dewender arch at JonnyJD dot net pkgname=distro-info pkgver=1.7 -pkgrel=2 +pkgrel=3 pkgdesc="provides information about the distributions' releases" arch=('i686' 'x86_64') url="http://packages.debian.org/sid/distro-info" license=('MIT') depends=('distro-info-data>=0.60' 'glibc' 'python') -makedepends=('dpkg') -checkdepends=('python-setuptools' 'shunit2') +makedepends=( + 'dpkg' + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel' +) +checkdepends=( + 'flake8' + 'python-black' + 'python-isort' + 'python-pylint' + 'shunit2' +) provides=('python-distro-info' 'python3-distro-info' 'perl-distro-info') conflicts=('python-distro-info' 'python3-distro-info' 'perl-distro-info') options=('!emptydirs') @@ -21,24 +33,23 @@ prepare() { sed -i \ -e 's/^\(LDFLAGS = .*\)/\1 '"${LDFLAGS}/" \ -e 's/ --install-layout=deb//g' \ + -e '/python3 setup.py/d' \ Makefile } build() { cd "${srcdir}/${pkgname}-${pkgver}" make + cd python + python -m build --wheel --no-isolation } check() { cd "${srcdir}/${pkgname}-${pkgver}" make test-commandline make test-perl - # We don't want to test all installed python versions -> don't use "make test" - # additionally the pylint and flake8 tests seem to fail currently - #cd python - #for pythonver in {python2,python}; do - # $pythonver setup.py test - #done + cd python + python -m unittest } package() { @@ -46,6 +57,7 @@ package() { # vendor can currently be only ubuntu or debian # with ubuntu you can build for PPA (with bzr-builddeb) make DESTDIR="${pkgdir}/" VENDOR="ubuntu" install + python -I -m installer --destdir="${pkgdir}" python/dist/*.whl install -D -m 644 debian/copyright "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } |