[arch-commits] Commit in python-utils/trunk (PKGBUILD)
David Runge
dvzrv at archlinux.org
Tue Aug 27 16:14:53 UTC 2019
Date: Tuesday, August 27, 2019 @ 16:14:51
Author: dvzrv
Revision: 503310
upgpkg: python-utils 2.3.0-4
Dropping python2 support. Updating maintainer. Adding docs. Running tests directly via pytest. Minor cleanups.
Modified:
python-utils/trunk/PKGBUILD
----------+
PKGBUILD | 63 +++++++++++++++++++++++++------------------------------------
1 file changed, 26 insertions(+), 37 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-08-27 16:10:14 UTC (rev 503309)
+++ PKGBUILD 2019-08-27 16:14:51 UTC (rev 503310)
@@ -1,56 +1,45 @@
-# Maintainer: Maxim Andersson <thesilentboatman at gmail.com>
-# Co-Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
-# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
+# Maintainer: David Runge <dave at sleepmap.de>
+# Contributor: Maxim Andersson <thesilentboatman at gmail.com>
+# Contributor: NicoHood <archlinux {cat} nicohood {dog} de>
-_pkgname=python-utils
-_pypiname=python-utils
-pkgbase=python-utils
pkgdesc="A module with some convenient utilities not included with the standard Python install"
-pkgname=('python-utils' 'python2-utils')
+pkgname=python-utils
pkgver=2.3.0
-pkgrel=3
+pkgrel=4
url="https://github.com/WoLpH/python-utils"
license=('BSD')
-arch=("any")
-# pytest-runner needed as makedepends because it is in setup_requires, move to checkdepends for next release
-makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools' 'python-pytest-runner' 'python2-pytest-runner')
-source=("https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz"{,.asc})
+arch=('any')
+depends=('python-six')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner')
+source=("https://pypi.org/packages/source/p/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.asc})
sha512sums=('482ccf9c635a0cbe603b69488a364d9033f8b7fada279d901725b5bf91ac13b1cd4a6b7e8d5834a9355d97d8b0803397d5e13da2b7ba72f8d8e2f7f39fee027a'
'SKIP')
validpgpkeys=('149325FD15904E9C4EB89E95E81444E9CE1F695D') # Rick van Hattem <wolph at wol.ph>
prepare() {
- cd "${srcdir}"/${_pypiname}-${pkgver}
- # don't force flakes/pep8 checks when packaging
- sed -i '/addopts/,/--flakes/d' pytest.ini
- # sources include broken pyc from the developer's machine
- find tests/ -name '*.pyc' -delete
+ cd "${pkgname}-${pkgver}"
+ # don't care about custom pytest flags
+ rm -v pytest.ini
}
build() {
- cd "${srcdir}/${_pypiname}-${pkgver}"
- python setup.py build
- python2 setup.py build
+ cd "${pkgname}-${pkgver}"
+ python setup.py build
}
check() {
- cd "${srcdir}/${_pypiname}-${pkgver}"
- python setup.py pytest
- python2 setup.py pytest
+ cd "${pkgname}-${pkgver}"
+ export PYTHONPATH="${PWD}/build:${PYTHONPATH}"
+ py.test
}
-package_python-utils() {
- depends=('python' 'python-six')
-
- cd "${srcdir}/${_pypiname}-${pkgver}"
- python setup.py install --skip-build --root="${pkgdir}" --optimize=1
- install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+package() {
+ cd "${pkgname}-${pkgver}"
+ python setup.py install --skip-build \
+ --optimize=1 \
+ --prefix=/usr \
+ --root="${pkgdir}"
+ install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}
-
-package_python2-utils() {
- depends=('python2' 'python2-six')
-
- cd "${srcdir}/${_pypiname}-${pkgver}"
- python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
- install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
More information about the arch-commits
mailing list