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

Felix Yan felixonmars at archlinux.org
Sat Mar 21 00:30:25 UTC 2020


    Date: Saturday, March 21, 2020 @ 00:30:24
  Author: felixonmars
Revision: 378019

upgpkg: python-virtualenv 20.0.11-1

Modified:
  python-virtualenv/trunk/PKGBUILD

----------+
 PKGBUILD |   64 ++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 34 insertions(+), 30 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-20 21:52:01 UTC (rev 378018)
+++ PKGBUILD	2020-03-21 00:30:24 UTC (rev 378019)
@@ -2,57 +2,60 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 # Contributor: Daniele Paolella <dp at mcrservice.it>
 
+pkgbase=python-virtualenv
 pkgname=('python-virtualenv' 'python2-virtualenv')
-pkgver=16.2.0
+pkgver=20.0.11
 pkgrel=1
 pkgdesc="Virtual Python Environment builder"
 url="https://virtualenv.pypa.io/"
 arch=('any')
 license=('MIT')
-makedepends=('python-setuptools' 'python-sphinx' 'python2-setuptools' 'towncrier')
-checkdepends=('python-pytest-runner' 'python-mock' 'python2-pytest-runner' 'python2-mock'
-              'python-pip' 'python2-pip')
+makedepends=('python-setuptools' 'python-appdirs' 'python-filelock' 'python-six'
+             'python2-setuptools' 'python2-appdirs' 'python2-filelock' 'python2-six'
+             'python2-contextlib2' 'python2-importlib-metadata' 'python2-importlib_resources'
+             'python2-pathlib2'
+             'python-setuptools-scm' 'python2-setuptools-scm' 'python-sphinx'
+             'python-sphinx_rtd_theme' 'python-sphinx-argparse' 'towncrier')
+checkdepends=('python-pytest-mock' 'python2-pytest' 'python2-pytest-mock' 'python-pip' 'python2-pip'
+              'python-coverage' 'python2-coverage' 'fish' 'xonsh')
 replaces=('virtualenv')
 conflicts=('virtualenv')
 options=('!makeflags')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/pypa/virtualenv/archive/${pkgver}.tar.gz)
-sha512sums=('1c80f1ea693a4223d78571919bf7e33650e569060674cacf880f2142e6cd78a39d2cd2c2310bdbb6968ff0dc2e75ab1245029a0e792228d15dc33569b237d58a')
+source=($pkgbase-$pkgver.tar.gz::https://github.com/pypa/virtualenv/archive/$pkgver.tar.gz)
+sha512sums=('f21ba4bd72633bc2e9abc6fb457e436f5c32b5467824600ad4c4871f5d8a3d18f237a3d1737c2d15c5fed5d9e3ff00b7b7f22a3f549dd59c26c5e575d796d3ec')
 
+export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+
 prepare() {
-  cp -a virtualenv-${pkgver}{,-py2}
+  cp -a virtualenv-$pkgver{,-py2}
 }
 
 build() {
-  (cd virtualenv-${pkgver}
-    python setup.py build
-    export PYTHONPATH="$PWD/build/lib"
+  (cd virtualenv-$pkgver
+    python setup.py build egg_info
+    export PYTHONPATH="$PWD/build/lib:$PWD/src"
     sphinx-build -b man docs docs/_build/man
-    sphinx-build -b text docs docs/_build/text
   )
-  (cd virtualenv-${pkgver}-py2
-    python2 setup.py build
-    export PYTHONPATH="$PWD/build/lib"
-    sphinx-build -b man docs docs/_build/man
-    sphinx-build -b text docs docs/_build/text
+  (cd virtualenv-$pkgver-py2
+    python2 setup.py build egg_info
   )
 }
 
 check() {
-  (cd virtualenv-${pkgver}
-    python setup.py pytest --addopts "--deselect tests/test_source_content.py::test_wheel_contains"
+  (cd virtualenv-$pkgver
+    PYTHONPATH="$PWD/build/lib:$PWD/src" python -m pytest
   )
-  (cd virtualenv-${pkgver}-py2
-    python2 setup.py pytest --addopts "--deselect tests/test_source_content.py::test_wheel_contains \
-                                       --deselect tests/test_bootstrap.py"
+  (cd virtualenv-$pkgver-py2
+    # Our python2 has bad pyc mtime due to makepkg, which fails this test
+    PYTHONPATH="$PWD/build/lib:$PWD/src" python2 -m pytest --deselect tests/unit/create/test_creator.py::test_pyc_only
   )
 }
 
 package_python-virtualenv() {
-  depends=('python-setuptools')
+  depends=('python-setuptools' 'python-appdirs' 'python-filelock' 'python-six')
 
   cd virtualenv-$pkgver
   python setup.py install --prefix=/usr --root="$pkgdir" --skip-build
-  install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -Dm 644 docs/_build/man/virtualenv.1 "${pkgdir}/usr/share/man/man1/virtualenv.1"
   ln -s virtualenv.1.gz "${pkgdir}/usr/share/man/man1/virtualenv3.1.gz"
 
@@ -59,21 +62,22 @@
   # link to a version with 3 suffix as well
   ln "$pkgdir/usr/bin/virtualenv" "$pkgdir/usr/bin/virtualenv3"
 
-  install -D -m644 LICENSE.txt \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -D -m644 LICENSE -t \
+    "$pkgdir"/usr/share/licenses/$pkgname/
 }
 
 package_python2-virtualenv() {
-  depends=('python2-setuptools')
+  depends=('python2-setuptools' 'python2-appdirs' 'python2-filelock' 'python2-six'
+           'python2-contextlib2' 'python2-importlib-metadata' 'python2-importlib_resources'
+           'python2-pathlib2')
 
   cd virtualenv-$pkgver-py2
   python2 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
-  install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -Dm 644 docs/_build/man/virtualenv.1 "${pkgdir}/usr/share/man/man1/virtualenv2.1"
+  install -Dm 644 ../virtualenv-$pkgver/docs/_build/man/virtualenv.1 "${pkgdir}/usr/share/man/man1/virtualenv2.1"
 
   # move this "old" version out of the way
   mv "$pkgdir/usr/bin/virtualenv" "$pkgdir/usr/bin/virtualenv2"
 
-  install -D -m644 LICENSE.txt \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -D -m644 LICENSE -t \
+    "$pkgdir"/usr/share/licenses/$pkgname/
 }



More information about the arch-commits mailing list