[arch-commits] Commit in python-pip/repos (testing-any testing-any/PKGBUILD)

Felix Yan felixonmars at archlinux.org
Tue Dec 24 21:50:03 UTC 2019


    Date: Tuesday, December 24, 2019 @ 21:50:03
  Author: felixonmars
Revision: 372227

archrelease: copy trunk to testing-any

Added:
  python-pip/repos/testing-any/
  python-pip/repos/testing-any/PKGBUILD
    (from rev 372226, python-pip/trunk/PKGBUILD)

----------+
 PKGBUILD |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

Copied: python-pip/repos/testing-any/PKGBUILD (from rev 372226, python-pip/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2019-12-24 21:50:03 UTC (rev 372227)
@@ -0,0 +1,89 @@
+# Maintainer: Dan McGee <dan at archlinux.org>
+# Contributor: Eli Schwartz <eschwartz at archlinux.org>
+# Contributor: Sebastien Binet <binet at lblbox>
+
+pkgname=('python-pip' 'python2-pip')
+pkgver=19.3
+pkgrel=1
+pkgdesc="The PyPA recommended tool for installing Python packages"
+url="https://pip.pypa.io/"
+arch=('any')
+license=('MIT')
+_deps=('setuptools' 'appdirs' 'cachecontrol' 'colorama' 'contextlib2' 'distlib' 'distro' 'html5lib'
+       'msgpack' 'packaging' 'pep517' 'progress' 'pyparsing' 'pytoml' 'requests' 'retrying'
+       'setuptools' 'six' 'webencodings')
+makedepends=("${_deps[@]/#/python-}" "${_deps[@]/#/python2-}" 'python2-ipaddress' 'python-sphinx')
+checkdepends=('python-pytest-runner' 'python-scripttest' 'python-virtualenv' 'python-pretend'
+              'python-yaml' 'python-mock' 'python-freezegun' 'python-pip' 'python-wheel'
+              'git' 'subversion')
+source=("pip-${pkgver}.tar.gz::https://github.com/pypa/pip/archive/${pkgver}.tar.gz")
+sha512sums=('4498d1d26f19ddfb7246765e5cead0ee16ffc3d9413c4b179573d12686a7159749dbfb6bea5c901828bddb08e526b1cfea094fa3283b146e0a2498b4c9b67f97')
+
+shopt -s extglob
+prepare() {
+  cd "$srcdir/pip-$pkgver"
+
+  rm -rf src/pip/_vendor/!(__init__.py)
+  sed -i -e 's/DEBUNDLED = False/DEBUNDLED = True/' \
+            src/pip/_vendor/__init__.py
+}
+
+build() {
+  cd "$srcdir/pip-$pkgver"
+
+  python setup.py build
+  python2 setup.py build
+
+  cd docs/
+  PYTHONPATH="$srcdir/pip-$pkgver/src/" sphinx-build -W -b man -d build/doctrees/man man build/man -c html
+  mkdir -p build/man-pip2
+  cd build/man
+  for manfile in *; do
+    sed 's/pip/pip2/g;s/PIP/PIP2/g' $manfile > ../man-pip2/${manfile/pip/pip2}
+  done
+}
+
+check() {
+  cd "$srcdir"/pip-$pkgver
+  pip wheel -w tests/data/common_wheels -r tools/requirements/tests-common_wheels.txt
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages" PATH="$PWD/tmp_install/usr/bin:$PATH" \
+    python setup.py pytest --addopts "-m unit --junit-xml=junit/unit-test.xml" || warning "Tests failed"
+}
+
+package_python-pip() {
+  depends=("${_deps[@]/#/python-}")
+
+  cd "$srcdir/pip-$pkgver"
+  python setup.py install --prefix=/usr --root="$pkgdir"
+
+  install -D -m644 LICENSE.txt \
+	  "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  install -Dm644 -t "$pkgdir"/usr/share/man/man1 docs/build/man/*
+
+  PYTHONPATH="$pkgdir"/usr/lib/python3.8/site-packages "$pkgdir"/usr/bin/pip completion --bash \
+    | install -Dm644 /dev/stdin "$pkgdir"/usr/share/bash-completion/completions/pip
+}
+
+package_python2-pip() {
+  depends=("${_deps[@]/#/python2-}" 'python2-ipaddress')
+  conflicts=('python-pyinstall')
+  replaces=('python-pyinstall')
+
+  cd "$srcdir/pip-$pkgver"
+  python2 setup.py install --prefix=/usr --root="$pkgdir"
+
+  mv "$pkgdir/usr/bin/pip" "$pkgdir/usr/bin/pip2"
+  sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" \
+    ${pkgdir}/usr/lib/python2.7/site-packages/pip/__init__.py
+  python2 -m compileall ${pkgdir}/usr/lib/python2.7/site-packages/pip/__init__.py
+
+  install -D -m644 LICENSE.txt \
+	  "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  install -Dm644 -t "$pkgdir"/usr/share/man/man1 docs/build/man-pip2/*
+
+  PYTHONPATH="$pkgdir"/usr/lib/python2.7/site-packages "$pkgdir"/usr/bin/pip2 completion --bash \
+    | install -Dm644 /dev/stdin "$pkgdir"/usr/share/bash-completion/completions/pip2
+}



More information about the arch-commits mailing list