[arch-commits] Commit in python-utils/trunk (PKGBUILD)
Eli Schwartz
eschwartz at archlinux.org
Tue Jan 1 22:22:56 UTC 2019
Date: Tuesday, January 1, 2019 @ 22:22:55
Author: eschwartz
Revision: 420240
upgpkg: python-utils 2.3.0-3
add testsuite
fix build dependencies being downloaded as eggs from PyPI during build()
Modified:
python-utils/trunk/PKGBUILD
----------+
PKGBUILD | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-01-01 22:18:00 UTC (rev 420239)
+++ PKGBUILD 2019-01-01 22:22:55 UTC (rev 420240)
@@ -8,29 +8,37 @@
pkgdesc="A module with some convenient utilities not included with the standard Python install"
pkgname=('python-utils' 'python2-utils')
pkgver=2.3.0
-pkgrel=2
+pkgrel=3
url="https://github.com/WoLpH/python-utils"
license=('BSD')
arch=("any")
-makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
-source=("${_pkgname}-${pkgver}.tar.gz::https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz"
- "${_pkgname}-${pkgver}.tar.gz.asc::https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz.asc")
+# 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})
sha512sums=('482ccf9c635a0cbe603b69488a364d9033f8b7fada279d901725b5bf91ac13b1cd4a6b7e8d5834a9355d97d8b0803397d5e13da2b7ba72f8d8e2f7f39fee027a'
'SKIP')
validpgpkeys=('149325FD15904E9C4EB89E95E81444E9CE1F695D') # Rick van Hattem <wolph at wol.ph>
prepare() {
- cp -a "${srcdir}/${_pypiname}-${pkgver}"{,-py2}
+ 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
}
build() {
cd "${srcdir}/${_pypiname}-${pkgver}"
python setup.py build
-
- cd "${srcdir}/${_pypiname}-${pkgver}-py2"
python2 setup.py build
}
+check() {
+ cd "${srcdir}/${_pypiname}-${pkgver}"
+ python setup.py pytest
+ python2 setup.py pytest
+}
+
package_python-utils() {
depends=('python' 'python-six')
@@ -42,7 +50,7 @@
package_python2-utils() {
depends=('python2' 'python2-six')
- cd "${srcdir}/${_pypiname}-${pkgver}-py2"
+ 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