diff options
Diffstat (limited to 'community/py3-pip/APKBUILD')
-rw-r--r-- | community/py3-pip/APKBUILD | 113 |
1 files changed, 54 insertions, 59 deletions
diff --git a/community/py3-pip/APKBUILD b/community/py3-pip/APKBUILD index 0a093b79f13..1cb47be3e9a 100644 --- a/community/py3-pip/APKBUILD +++ b/community/py3-pip/APKBUILD @@ -1,51 +1,46 @@ # Contributor: Fabian Affolter <fabian@affolter-engineering.ch> -# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> +# Contributor: fossdd <fossdd@pwned.life> +# Maintainer: fossdd <fossdd@pwned.life> pkgname=py3-pip -_pkgname=pip -pkgver=20.1.1 -pkgrel=0 +pkgver=24.0 +pkgrel=2 pkgdesc="Tool for installing and managing Python packages" -options="!check" # Requires https://github.com/pypa/scripttest -url="http://www.pip-installer.org" +url="https://pip.pypa.io" arch="noarch" license="MIT" depends=" - python3 - py3-appdirs - py3-cachecontrol - py3-colorama - py3-distlib - py3-distro - py3-html5lib - py3-msgpack - py3-packaging - py3-pep517 - py3-progress - py3-parsing - py3-toml - py3-requests - py3-retrying py3-setuptools - py3-six - py3-webencodings - py3-contextlib2 + python3 " makedepends=" py3-sphinx + py3-sphinx-copybutton + py3-sphinx-inline-tabs + py3-myst-parser " checkdepends=" + py3-cryptography + py3-freezegun + py3-mock + py3-pretend py3-pytest + py3-yaml + py3-scripttest + py3-virtualenv + py3-werkzeug " subpackages=" $pkgname-doc - $pkgname-zsh-completion:zshcomp:noarch - $pkgname-bash-completion:bashcomp:noarch + $pkgname-pyc + $pkgname-zsh-completion + $pkgname-bash-completion " -source="$pkgname-$pkgver.tar.gz::https://github.com/pypa/pip/archive/$pkgver.tar.gz" -builddir="$srcdir/$_pkgname-$pkgver" +source="https://github.com/pypa/pip/archive/$pkgver/pip-$pkgver.tar.gz" +builddir="$srcdir/pip-$pkgver" provides="py-pip=$pkgver-r$pkgrel" # Backwards compatibility replaces="py-pip" # Backwards compatibility +options="!check" # check is broken prepare() { default_prepare @@ -53,55 +48,55 @@ prepare() { # Remove certifi usage sed -i 's|from pip._vendor.certifi import where|where = lambda: "/etc/ssl/certs/ca-certificates.crt"|' src/pip/_internal/commands/debug.py - for f in src/pip/_vendor/*; do - if [ "${f##*/}" = __init__.py ]; then - continue - fi - rm -rf "$f" - done - sed -i -e 's/DEBUNDLED = False/DEBUNDLED = True/' src/pip/_vendor/__init__.py + # Do not use furo as HTML theme in docs + # furo is not available in Alpine + sed -i '/html_theme = "furo"/d' docs/html/conf.py + + # Upstream uses a Python 2/3 compatibility library for csv with Python 3 semantics in tests + # We only target Python 3 and csv23 is not (yet) packaged + # As of 20.1b1, this workaround was sufficient to get around the missing dependency + sed -i 's/csv23/csv/g' tests/lib/wheel.py + + # not packaged (and has another ~5 deps), and not actually used it seems + # (maybe for html docs) + sed -i '/sphinxcontrib.towncrier/d' docs/html/conf.py } build() { python3 setup.py build - # Build manpage - cd docs/ - PYTHONPATH="$builddir/src/" sphinx-build -W -b man -d build/doctrees/man man build/man -c html + # see noxfile.py + export PYTHONPATH="$PWD/build/lib" + sphinx-build -c docs/html -d docs/build/doctrees/man -b man docs/man docs/build/man } check() { - PYTHONPATH="./build/lib" python3 -m pytest + # --deselect'ed and -k'ed tests are not compatible with the latest virtualenv + # These files contain almost 500 tests so we should enable them back + # as soon as pip will be compatible upstream + # https://github.com/pypa/pip/pull/8441 + PYTHONPATH="$PWD/build/lib" pytest -m 'not network' \ + -k "not test_from_link_vcs_with_source_dir_obtains_commit_id and not test_from_link_vcs_without_source_dir and not test_should_cache_git_sha" \ + --deselect tests/functional \ + --deselect tests/lib/test_lib.py \ + --deselect tests/unit/test_build_env.py } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 setup.py install --skip-build --root="$pkgdir" install -Dm644 docs/build/man/* -t "$pkgdir"/usr/share/man/man1 - PYTHONPATH="$pkgdir"/usr/lib/python3.8/site-packages "$pkgdir"/usr/bin/pip \ + local _py3ver=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') + PYTHONPATH="$pkgdir"/usr/lib/python$_py3ver/site-packages "$pkgdir"/usr/bin/pip \ completion --bash | \ install -Dm644 /dev/stdin "$pkgdir"/usr/share/bash-completion/completions/pip - PYTHONPATH="$pkgdir"/usr/lib/python3.8/site-packages "$pkgdir"/usr/bin/pip \ + PYTHONPATH="$pkgdir"/usr/lib/python$_py3ver/site-packages "$pkgdir"/usr/bin/pip \ completion --zsh | \ install -Dm644 /dev/stdin "$pkgdir"/usr/share/zsh/site-functions/_pip } -bashcomp() { - depends="" - pkgdesc="Bash completions for $pkgname" - install_if="$pkgname=$pkgver-r$pkgrel bash-completion" - - amove usr/share/bash-completion/completions -} - -zshcomp() { - depends="" - pkgdesc="Zsh completions for $pkgname" - install_if="$pkgname=$pkgver-r$pkgrel zsh" - - amove usr/share/zsh/site-functions -} - -sha512sums="ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658 py3-pip-20.1.1.tar.gz" +sha512sums=" +0c2ecb2ecde4f155c83468d35bc4f52f37efffc16821ae7c706d035e1e8cc3709b41cb10f8140ff09205e8bbdba2c76128ad76d1cbd18401328b619228e834df pip-24.0.tar.gz +" |