blob: 3531f1e4d083c4f8c019cbd044587145453376f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# $Id$
# Maintainer: Dan McGee <dan@archlinux.org>
# Contributor: Sebastien Binet <binet@lblbox>
pkgname=('python-pip' 'python2-pip')
pkgver=9.0.1
pkgrel=3
pkgdesc="The PyPA recommended tool for installing Python packages"
url="https://pip.pypa.io/"
arch=('any')
license=('MIT')
makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
source=(https://pypi.io/packages/source/p/pip/pip-${pkgver}.tar.gz)
md5sums=('35f01da33009719497f01a4ba69d63c9')
sha256sums=('09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d')
package_python-pip() {
depends=('python' 'python-setuptools')
cd "$srcdir/pip-$pkgver"
python setup.py build
python setup.py install --prefix=/usr --root="$pkgdir"
install -D -m644 LICENSE.txt \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -dm755 "$pkgdir"/usr/share/bash-completion/completions
PYTHONPATH="$pkgdir"/usr/lib/python3.6/site-packages "$pkgdir"/usr/bin/pip completion --bash > "$pkgdir"/usr/share/bash-completion/completions/pip
}
package_python2-pip() {
depends=('python2' 'python2-setuptools')
conflicts=('python-pyinstall')
replaces=('python-pyinstall')
cd "$srcdir/pip-$pkgver"
python2 setup.py build
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 -dm755 "$pkgdir"/usr/share/bash-completion/completions
PYTHONPATH="$pkgdir"/usr/lib/python2.7/site-packages "$pkgdir"/usr/bin/pip2 completion --bash > "$pkgdir"/usr/share/bash-completion/completions/pip2
sed -i 's/pip/pip2/g' "$pkgdir"/usr/share/bash-completion/completions/pip2
}
|