From 232af986dabaf44064e5e4f040e516fd0e217d57 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 11 Sep 2019 14:57:47 +0300 Subject: [PATCH] python: Fix python not always installing pip/setuptools --- extra/python/build | 4 +++- extra/python/checksums | 1 + extra/python/patches/python3-always-pip.patch | 13 +++++++++++++ extra/python/sources | 1 + extra/python/version | 2 +- 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 extra/python/patches/python3-always-pip.patch diff --git a/extra/python/build b/extra/python/build index 2a036195..19d7173b 100755 --- a/extra/python/build +++ b/extra/python/build @@ -1,11 +1,13 @@ #!/bin/sh -e +patch -p1 < python3-always-pip.patch + ./configure \ --prefix=/usr \ --enable-shared \ --with-system-expat \ --with-system-ffi \ - --with-ensurepip=install + --with-ensurepip=yes make make DESTDIR="$1" install diff --git a/extra/python/checksums b/extra/python/checksums index 407e588e..66954e5d 100644 --- a/extra/python/checksums +++ b/extra/python/checksums @@ -1 +1,2 @@ fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f Python-3.7.4.tar.xz +1a184c64f85d7a2fb57642135ea298ddd005684c5bd3e601b932cf31b82b9417 python3-always-pip.patch diff --git a/extra/python/patches/python3-always-pip.patch b/extra/python/patches/python3-always-pip.patch new file mode 100644 index 00000000..91789c98 --- /dev/null +++ b/extra/python/patches/python3-always-pip.patch @@ -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: diff --git a/extra/python/sources b/extra/python/sources index 773e93d7..fc01fac6 100644 --- a/extra/python/sources +++ b/extra/python/sources @@ -1 +1,2 @@ https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz +patches/python3-always-pip.patch diff --git a/extra/python/version b/extra/python/version index eed034f5..5688318a 100644 --- a/extra/python/version +++ b/extra/python/version @@ -1 +1 @@ -3.7.4 4 +3.7.4 5