mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 20:25:28 +03:00
103 lines
2.7 KiB
Text
103 lines
2.7 KiB
Text
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
pkgname=py3-pip
|
|
_pkgname=pip
|
|
pkgver=20.0.2
|
|
pkgrel=2
|
|
pkgdesc="Tool for installing and managing Python packages"
|
|
options="!check" # Requires pytest
|
|
url="http://www.pip-installer.org"
|
|
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-pytoml
|
|
py3-requests
|
|
py3-retrying
|
|
py3-setuptools
|
|
py3-six
|
|
py3-webencodings
|
|
py3-contextlib2
|
|
"
|
|
makedepends="
|
|
py3-sphinx
|
|
"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-zsh-completion:zshcomp:noarch
|
|
$pkgname-bash-completion:bashcomp:noarch
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/pypa/pip/archive/$pkgver.tar.gz
|
|
https://github.com/pypa/pip/commit/9be7454fd69081d06a3f8234a08a6d791e13173f.patch
|
|
"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
provides="py-pip=$pkgver-r$pkgrel" # Backwards compatibility
|
|
replaces="py-pip" # Backwards compatibility
|
|
|
|
prepare() {
|
|
default_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
|
|
}
|
|
|
|
build() {
|
|
python3 setup.py build
|
|
|
|
# Build manpage
|
|
cd docs/
|
|
PYTHONPATH="$srcdir/pip-$pkgver/src/" sphinx-build -W -b man -d build/doctrees/man man build/man -c html
|
|
}
|
|
|
|
package() {
|
|
python3 setup.py install --prefix=/usr --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 \
|
|
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 \
|
|
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="f9965944ca0f319d01db1638ce97cf64772afff1778b3b1271155de73208cfcb3954d89a469c1143c0bf3288a53d4446165a49df994374b16ac6f7ffdae85857 py3-pip-20.0.2.tar.gz
|
|
61732786303ca7ec7828d04099a884534034d50cdd9a7a0de2ace34c28381a992943880f03797a64d5d4f3a76d317d356f76ffff5e3ffd97ed611b234cc05528 9be7454fd69081d06a3f8234a08a6d791e13173f.patch"
|