summaryrefslogtreecommitdiff
path: root/dev-lang/python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/metadata.xml5
-rw-r--r--dev-lang/python/python-3.11.0_beta5.ebuild12
2 files changed, 16 insertions, 1 deletions
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
index 38626e26f8a9..d3ddcf0b3820 100644
--- a/dev-lang/python/metadata.xml
+++ b/dev-lang/python/metadata.xml
@@ -9,6 +9,11 @@
<flag name="bluetooth">
Build Bluetooth protocol support in socket module
</flag>
+ <flag name="ensurepip">
+ Install the ensurepip module that uses bundled wheels
+ to bootstrap pip and setuptools (if disabled, it will
+ be only possible to use venv `--without-pip`)
+ </flag>
<flag name="libedit">
Link readline extension against <pkg>dev-libs/libedit</pkg>
instead of <pkg>sys-libs/readline</pkg>
diff --git a/dev-lang/python/python-3.11.0_beta5.ebuild b/dev-lang/python/python-3.11.0_beta5.ebuild
index aab4bbbdc169..6cd158622a3f 100644
--- a/dev-lang/python/python-3.11.0_beta5.ebuild
+++ b/dev-lang/python/python-3.11.0_beta5.ebuild
@@ -27,9 +27,16 @@ SRC_URI="
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
+# ensurepip bundles pip and setuptools, and pip bundles a lot
+LICENSE+="
+ ensurepip? ( Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MIT MPL-2.0 PSF-2 )
+"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst"
+IUSE="
+ bluetooth build +ensurepip examples gdbm hardened libedit lto
+ +ncurses pgo +readline +sqlite +ssl test tk wininst
+"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
@@ -404,6 +411,9 @@ src_install() {
pax-mark m "${ED}/usr/bin/${abiver}"
fi
+ if ! use ensurepip; then
+ rm -r "${libdir}"/ensurepip || die
+ fi
use sqlite || rm -r "${libdir}/"sqlite3 || die
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die