python2: Enable pip.

This commit is contained in:
Dylan Araps 2020-06-07 23:14:46 +03:00
parent 699d79ffae
commit cfd7208fc9
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
5 changed files with 20 additions and 3 deletions

View File

@ -1,8 +1,10 @@
#!/bin/sh -e
patch -p1 < python2-always-pip.patch
./configure \
--prefix=/usr \
--without-ensurepip
--with-ensurepip=yes
make
make DESTDIR="$1" install
@ -22,5 +24,5 @@ chmod u+w "$1/usr/lib/libpython"*.a
rm -rf lib2to3 pydoc* idlelib turtle* ensurepip lib-tk config
cd "$1/usr/bin"
rm -f 2to3* pydoc* idle* python
rm -f 2to3* pydoc* idle* python pip
}

View File

@ -1 +1,2 @@
b62c0e7937551d0cc02b8fd5cb0f544f9405bafc9a54d3808ed4594812edef43 Python-2.7.18.tar.xz
1a184c64f85d7a2fb57642135ea298ddd005684c5bd3e601b932cf31b82b9417 python2-always-pip.patch

View File

@ -0,0 +1,13 @@
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index 526dfd0..d85dc33 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -104,7 +104,7 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
additional_paths.append(os.path.join(tmpdir, wheel_name))
# Construct the arguments to be passed to the pip command
- args = ["install", "--no-index", "--find-links", tmpdir]
+ args = ["install", "-I", "--no-index", "--find-links", tmpdir]
if root:
args += ["--root", root]
if upgrade:

View File

@ -1 +1,2 @@
https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
patches/python2-always-pip.patch

View File

@ -1 +1 @@
2.7.18 2
2.7.18 3