[arch-commits] Commit in python-pip-api/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sun Nov 15 00:00:51 UTC 2020


    Date: Sunday, November 15, 2020 @ 00:00:51
  Author: felixonmars
Revision: 754283

devendor and fix tests

Modified:
  python-pip-api/trunk/PKGBUILD

----------+
 PKGBUILD |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-14 23:58:34 UTC (rev 754282)
+++ PKGBUILD	2020-11-15 00:00:51 UTC (rev 754283)
@@ -7,12 +7,23 @@
 url="https://github.com/di/pip-api"
 license=('Apache')
 arch=('any')
-depends=('python-packaging' 'python-pip')
+depends=('python-packaging' 'python-pyparsing' 'python-pip')
 makedepends=('python-setuptools')
-checkdepends=('python-pytest-runner' 'python-pretend' 'python-virtualenv')
+checkdepends=('python-pytest-runner' 'python-pretend')  # 'python-virtualenv' needs < 20
 source=("$pkgname-$pkgver.tar.gz::https://github.com/di/pip-api/archive/$pkgver.tar.gz")
 sha512sums=('d3802b8728b814dae9551cc12612eb10a8de061cd64ac40647513d083c45f4bee218b1d2ba772c4c4df05275c4dc8e935e8e69c2e2cf8c6420e6c1158c768c78')
 
+prepare() {
+  cd pip-api-$pkgver
+  # Devendor
+  sed -i 's/pip_api._vendor.//' pip_api/*.py tests/*.py
+
+  # Make it install an old virtualenv for tests
+  sed -i '/install_requires/a \    tests_require=["virtualenv<20"],' setup.py
+
+  rm -r pip_api/_vendor
+}
+
 build() {
   cd pip-api-$pkgver
   python setup.py build



More information about the arch-commits mailing list