Date: Friday, March 29, 2019 @ 04:13:59 Author: felixonmars Revision: 349393
archrelease: copy trunk to testing-any Added: python-pip/repos/testing-any/ python-pip/repos/testing-any/PKGBUILD (from rev 349392, python-pip/trunk/PKGBUILD) python-pip/repos/testing-any/progress.patch (from rev 349392, python-pip/trunk/progress.patch) ----------------+ PKGBUILD | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ progress.patch | 21 ++++++++++ 2 files changed, 127 insertions(+) Copied: python-pip/repos/testing-any/PKGBUILD (from rev 349392, python-pip/trunk/PKGBUILD) =================================================================== --- testing-any/PKGBUILD (rev 0) +++ testing-any/PKGBUILD 2019-03-29 04:13:59 UTC (rev 349393) @@ -0,0 +1,106 @@ +# Maintainer: Dan McGee <d...@archlinux.org> +# Contributor: Eli Schwartz <eschwa...@archlinux.org> +# Contributor: Sebastien Binet <binet@lblbox> + +pkgname=('python-pip' 'python2-pip') +pkgver=19.0.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' '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" + progress.patch + https://github.com/pypa/pip/commit/8ef3283fcf7c7c5537f305a374355edc96f40d3d.patch) +sha512sums=('f56df1e2fe18eccc4dcba66b0a93a933eb94d12ed0f31d3923662fb85075192674c98bbc00dd48185b1d87cf28a64a6dc321de524e4ccb39a8877b3d5cf578e1' + '77f48f1ae3c977087630a2009e55d38dc6daa53b08767e3aa2fa51405f76de0291c48cebd5e9dc42346f14bb43189f1f49a325faffde9ce63a4377b63541a296' + 'b6cac141a701fde6726d48e51414c6003061c435a6af9cc8ff681365db5a3e24c446ea3227a662f10264332a59582a788576934ff0613fcc46d21ef665c0428e') + +shopt -s extglob +prepare() { + cd "$srcdir/pip-$pkgver" + + # Fix compat with python-progress 1.5 + # https://github.com/pypa/pip/pull/6319 + patch -Np1 -i ../progress.patch + + # fix vendor import + patch -Np1 -i ../8ef3283fcf7c7c5537f305a374355edc96f40d3d.patch + + rm -rf src/pip/_vendor/!(__init__.py) + sed -i -e 's/DEBUNDLED = False/DEBUNDLED = True/' \ + src/pip/_vendor/__init__.py + + # pytest 4 + sed -i 's/get_marker/get_closest_marker/' tests/conftest.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 -m venv "$srcdir/pyvenv" --system-site-packages + . "$srcdir/pyvenv/bin/activate" + python setup.py install + python setup.py pytest + ) || 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.7/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 +} Copied: python-pip/repos/testing-any/progress.patch (from rev 349392, python-pip/trunk/progress.patch) =================================================================== --- testing-any/progress.patch (rev 0) +++ testing-any/progress.patch 2019-03-29 04:13:59 UTC (rev 349393) @@ -0,0 +1,21 @@ +diff -u -r pip-18.1/src/pip/_internal/utils/ui.py pip-18.1-p/src/pip/_internal/utils/ui.py +--- pip-18.1/src/pip/_internal/utils/ui.py 2018-10-05 09:07:26.000000000 +0000 ++++ pip-18.1-p/src/pip/_internal/utils/ui.py 2019-03-08 08:51:47.324230770 +0000 +@@ -12,7 +12,7 @@ + Bar, ChargingBar, FillingCirclesBar, FillingSquaresBar, IncrementalBar, + ShadyBar, + ) +-from pip._vendor.progress.helpers import HIDE_CURSOR, SHOW_CURSOR, WritelnMixin ++from pip._vendor.progress import HIDE_CURSOR, SHOW_CURSOR + from pip._vendor.progress.spinner import Spinner + + from pip._internal.utils.compat import WINDOWS +@@ -241,7 +241,7 @@ + + + class DownloadProgressSpinner(WindowsMixin, InterruptibleMixin, +- DownloadProgressMixin, WritelnMixin, Spinner): ++ DownloadProgressMixin, Spinner): + + file = sys.stdout + suffix = "%(downloaded)s %(download_speed)s"