commit:     69eb59b9364beaf1ba279c7f631fc3d316cd72da
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 15 09:20:38 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 09:36:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69eb59b9

dev-lang/python: Install epython.py into stdlib

Install epython.py directly into stdlib rather than into site-packages
directory.  This makes it possible to rebuild all Python packages using
path without getting CPython itself into the rebuild graph.  It also
simplifies the ebuild a fair bit since the build system takes care
of byte-compiling the module.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...eta4-r1.ebuild => python-3.11.0_beta4-r2.ebuild} | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/dev-lang/python/python-3.11.0_beta4-r1.ebuild 
b/dev-lang/python/python-3.11.0_beta4-r2.ebuild
similarity index 96%
rename from dev-lang/python/python-3.11.0_beta4-r1.ebuild
rename to dev-lang/python/python-3.11.0_beta4-r2.ebuild
index 648a47f45541..4681473655c9 100644
--- a/dev-lang/python/python-3.11.0_beta4-r1.ebuild
+++ b/dev-lang/python/python-3.11.0_beta4-r2.ebuild
@@ -278,6 +278,9 @@ src_configure() {
        for mod in "${disable_modules[@]}"; do
                echo "MODULE_${mod}_STATE=disabled"
        done >> Makefile || die
+
+       # install epython.py as part of stdlib
+       echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
 }
 
 src_compile() {
@@ -424,25 +427,9 @@ src_install() {
                -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
                "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
 
-       local -x EPYTHON=python${PYVER}
-       # if not using a cross-compiler, use the fresh binary
-       if ! tc-is-cross-compiler; then
-               cat > python.wrap <<-EOF || die
-                       #!/bin/sh
-                       export 
LD_LIBRARY_PATH=\${PWD}\${LD_LIBRARY_PATH+:\${LD_LIBRARY_PATH}}
-                       exec ./python "\${@}"
-               EOF
-               chmod +x python.wrap || die
-               local -x PYTHON=./python.wrap
-       else
-               local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
-       fi
-
-       echo "EPYTHON='${EPYTHON}'" > epython.py || die
-       python_domodule epython.py
-
        # python-exec wrapping support
        local pymajor=${PYVER%.*}
+       local EPYTHON=python${PYVER}
        local scriptdir=${D}$(python_get_scriptdir)
        mkdir -p "${scriptdir}" || die
        # python and pythonX

Reply via email to