[arch-commits] Commit in python-pip/repos (staging-any staging-any/PKGBUILD)
Evangelos Foutras
foutrelis at archlinux.org
Sat Oct 26 05:30:20 UTC 2019
Date: Saturday, October 26, 2019 @ 05:30:20
Author: foutrelis
Revision: 365792
archrelease: copy trunk to staging-any
Added:
python-pip/repos/staging-any/
python-pip/repos/staging-any/PKGBUILD
(from rev 365791, python-pip/trunk/PKGBUILD)
----------+
PKGBUILD | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
Copied: python-pip/repos/staging-any/PKGBUILD (from rev 365791, python-pip/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD (rev 0)
+++ staging-any/PKGBUILD 2019-10-26 05:30:20 UTC (rev 365792)
@@ -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.2.3
+pkgrel=2
+pkgdesc="The PyPA recommended tool for installing Python packages"
+url="https://pip.pypa.io/"
+arch=('any')
+license=('MIT')
+_deps=('setuptools' 'appdirs' 'cachecontrol' 'colorama' 'distlib' 'distro' 'html5lib' 'lockfile'
+ 'msgpack' 'six' 'packaging' 'pep517' 'progress' 'pytoml' 'retrying' 'requests' 'urllib3'
+ '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=('59fcb79173529097662fcb9662f78fee7b00f441d49ea41f280da4b27875a425cccaa3daeda647ac7cddf936111923dc1546a3474fcdd7003777178e7143f6eb')
+
+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/tests-common_wheels-requirements.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