diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-07-15 11:20:38 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-07-15 11:36:17 +0200 |
commit | 69eb59b9364beaf1ba279c7f631fc3d316cd72da (patch) | |
tree | ad1f8518312dd805885e22a4acb1ab1a6ebf5487 /dev-lang | |
parent | profiles/arch: mask CPU_FLAGS_PPC on !ppc (diff) | |
download | gentoo-69eb59b9364beaf1ba279c7f631fc3d316cd72da.tar.gz gentoo-69eb59b9364beaf1ba279c7f631fc3d316cd72da.tar.bz2 gentoo-69eb59b9364beaf1ba279c7f631fc3d316cd72da.zip |
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@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/python-3.11.0_beta4-r2.ebuild (renamed from dev-lang/python/python-3.11.0_beta4-r1.ebuild) | 21 |
1 files 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 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 |