python-pip: use alternatives

This commit is contained in:
Alessio Sergi 2016-04-25 02:08:11 +02:00
parent df0b77b5a8
commit 713ab74e6c
2 changed files with 19 additions and 7 deletions

View File

@ -0,0 +1,11 @@
--- setup.py.orig
+++ setup.py
@@ -78,8 +78,6 @@ setup(
entry_points={
"console_scripts": [
"pip=pip:main",
- "pip%s=pip:main" % sys.version[:1],
- "pip%s=pip:main" % sys.version[:3],
],
},
tests_require=tests_require,

View File

@ -1,7 +1,7 @@
# Template file for 'python-pip' # Template file for 'python-pip'
pkgname=python-pip pkgname=python-pip
version=8.1.1 version=8.1.1
revision=1 revision=2
noarch=yes noarch=yes
wrksrc="pip-${version}" wrksrc="pip-${version}"
build_style=python-module build_style=python-module
@ -16,23 +16,24 @@ license="MIT"
distfiles="${PYPI_SITE}/p/pip/pip-${version}.tar.gz" distfiles="${PYPI_SITE}/p/pip/pip-${version}.tar.gz"
checksum=3e78d3066aaeb633d185a57afdccf700aa2e660436b4af618bcb6ff0fa511798 checksum=3e78d3066aaeb633d185a57afdccf700aa2e660436b4af618bcb6ff0fa511798
pre_build() { alternatives="
sed -i '/^#!/d' pip/__init__.py pip:pip:/usr/bin/pip2.7
} pip:pip2:/usr/bin/pip2.7"
post_install() { post_install() {
rm -f ${DESTDIR}/usr/bin/pip
ln -sf pip2.7 ${DESTDIR}/usr/bin/pip
vlicense LICENSE.txt LICENSE vlicense LICENSE.txt LICENSE
} }
python3.4-pip_package() { python3.4-pip_package() {
alternatives="
pip:pip:/usr/bin/pip3.4
pip:pip3:/usr/bin/pip3.4"
noarch=yes noarch=yes
depends="python3.4-setuptools" depends="python3.4-setuptools"
pycompile_version="3.4" pycompile_version="3.4"
pycompile_module="pip" pycompile_module="pip"
short_desc="${short_desc/Python2/Python3.4}" short_desc="${short_desc/Python2/Python3.4}"
pkg_install() { pkg_install() {
vmove usr/bin/pip3
vmove usr/bin/pip3.4 vmove usr/bin/pip3.4
vmove usr/lib/python3.4 vmove usr/lib/python3.4
vlicense LICENSE.txt LICENSE vlicense LICENSE.txt LICENSE