summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 21 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 25100829d096..e18e4cf2586b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}