From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/python/
Date: Wed, 11 May 2022 20:18:22 +0000 (UTC) [thread overview]
Message-ID: <1652300290.7e2a2e320eba675f3acab46e22647ca6514a329f.grobian@gentoo> (raw)
commit: 7e2a2e320eba675f3acab46e22647ca6514a329f
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed May 11 20:18:10 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed May 11 20:18:10 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=7e2a2e32
dev-lang/python-3.9.12: version bump
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
dev-lang/python/Manifest | 4 +
dev-lang/python/python-3.9.12.ebuild | 475 +++++++++++++++++++++++++++++++++++
2 files changed, 479 insertions(+)
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index f18ad79618..d71c4cd59f 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -2,11 +2,15 @@ DIST Python-3.10.4.tar.xz 19342692 BLAKE2B c430ad9bed71729fda29433af0614b6c0110a
DIST Python-3.10.4.tar.xz.asc 833 BLAKE2B 289f2e96bfc2b60c4ae94b1591779d604f203890c4f5db2ee16e305bf03c6ddb9c8d6da4471a06b5943e12888f37ca572ea30876e9a80382a26814f66b41b7bf SHA512 699e37bf09067083af159e3734b38c952bdc75432c8abfb7a7b8cce7ca975038da37490abeb5c13befd2dacb84a5341ad30de5d0a63d35af5c512215744f4d6d
DIST Python-3.8.8.tar.xz 18271736 BLAKE2B af0ff1acd919b365a58278e82678324ff884cc8120bcaf12e0e3afb1bd978e6469e256335df131935f51ff481fb83dda04e4b6f1cd1746611f9ec944db73d692 SHA512 64181db5aa48281284a3230436ebfb8cb91b645a9dec956fd48c0048334498477073fc4e14d6b426d0ef7fbcdcfd5d59cbf01a504e6c9014dc9529494b9309fb
DIST Python-3.8.8.tar.xz.asc 833 BLAKE2B a11188f9f68c518259de1a4e271bf56409d7356a7eb3dd8cbea7bbb0b5bc1b43f9aeb85bda4add65bbae906bef65cb20a30bcc77da04c0d383cd5b527821fd85 SHA512 0e6f11a310c1796dd056d9a4b63b5e03aa8dbd290088966e04a590a78c00003887dbfd7a7029a6cf8c5626ecd6ca91c1c16433bb0a41bf1225b02b8db8541b95
+DIST Python-3.9.12.tar.xz 19740524 BLAKE2B 05f2469aa53ca36221ef4976b17bfde3e5b86afd5a8114e5a7fd899f975a8e55022555ef718d5352ab68de1b7b23865a0bf713768c9c2b30d591438c9a396d25 SHA512 081981901e14149748fd35228db0b3b1d96fef227ae7404f07b8bad0fda4b02649bf31c348c94aefdaf3327565d78f9489437c2c02f647b15d41376a27a23e97
+DIST Python-3.9.12.tar.xz.asc 833 BLAKE2B 33436d0404a643215a8fd2b967ffd216201da24f374941bf65b888159ccfabcbe79b751eca2dd489b06605604338c8bbaab74aa10abbe4bcffaa54236301228e SHA512 dddaa27f8a29034f458edb6739398a5455c87fe37b6349e161865a9deedca118ffe9cb82663cc75bbe60b3b556399c0c6855f5262aac1fe90d36a3694fca65b2
DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1
DIST Python-3.9.6.tar.xz.asc 833 BLAKE2B 41901bfb80a901f2f14e86769e6d08ded8f75656d347201345183162e180e61442da871a1067572a54da579551166a19bf5436e51581bb10cb78afc4d28773fc SHA512 0673c8833f302c829bfde97453c52744f6aa99b4a72520f4cc384d4aa9d6ffd28a1407ceafb0a1ec4462b3aa74b656bf39c67872c4e6a131429ea58c47ad0ecc
DIST python-gentoo-patches-3.10.4.tar.xz 8592 BLAKE2B 67fba3e1fedb17430e5cd93da995b4acaf714db512031b5a2f775a25f793f007941561663cfa413d645ccddc2e22d65d250a40fa166cafda8805488d877ff57d SHA512 3ed2b8ff8f1eb8febe7dcd4b5d13d6d54468be1d525f8f1118977d3bbc78f690a597b09383939d023b03380a306e4bff1693382e29ff562312d803305b1709b2
DIST python-gentoo-patches-3.8.8_p1.tar.xz 15456 BLAKE2B 7d9f55f951f97ef7e08d0245dddd21f5b8d126735c1c392ba6326ad1c18023b477f62e9b6663d8e5b6f0362e442137d0b6ed3ea13b279cca6734d36dbe6e654f SHA512 7fff74d03a0c4cd4b5c977761179c2b9a0ed472847ee9544f54331cef7549557ac4d6b78e676058bd2b01c96ca59d84f04c55beca8ddc45f16b11ce349210eea
+DIST python-gentoo-patches-3.9.12.tar.xz 12848 BLAKE2B 5dd66fa94b136a463d2c4be3a5b7dfad770c3905467a1d81af02a35b2783ce7d614881c915ee8f8e764c1656963d6886d9c60c6e524f512e1bc496e42d01307b SHA512 07de63e47a8e547724099062239df8fcfd254f19d38be28131e6bbb094ffbab8483861fb6a5905e60d7fa7a1a5dc06785951fa31984ecad89516b0b742c47f91
DIST python-gentoo-patches-3.9.6_p1.tar.xz 12764 BLAKE2B 927718f1aadb5d5ef67e647a639a10bffdd48474bf01e50bd37ef1242bce57606b7b54c4823c1da3585ee76e737028163e38e9b4e19037585cc53f925e1c5fa7 SHA512 f06fb55786bd942e72e3225ee9ce218724aeee29f301279743588749007e991851a8f29db5b5dfd85435e3d763c00942947909a6fc60581bd0f3e8a6e913bff8
DIST python-prefix-gentoo-3.10.4-patches-r0.tar.xz 6772 BLAKE2B b807ae02242926d99c3823b73ce33193926d55891d54b5d214b4bdf24d2213b4d7b248030146a01698ceadd255affffef8937d84fc11e6d587ffcc91286e81b2 SHA512 a8f16d12b785a4b9ca884e4235cb298e4155273534a7957e517a679f0c2d4b35dcca08e445bed3fe2a80e3a6441f04004eae955a362eb1091ac1f9e2b9a5448f
DIST python-prefix-gentoo-3.8.7-patches-r2.tar.xz 8312 BLAKE2B 268f3cff62dc51d4f91994c3f6b05cea0e29edb1ccf39476ba52485fb94c3cad72b54ed5cd941c227bdad004a7ae0069d60ee6bbde5a30d16115263d0dc2a5c3 SHA512 e43ce1e9e851bebce968ee025f765fc9a558c8edc4ee2d51616043183fd12301ab3d5c7f92915238e53b5cf92f6c00617ab0fcf9859d4cebe0966271e6f64725
+DIST python-prefix-gentoo-3.9.12-patches-r0.tar.xz 7016 BLAKE2B 77045f38d8ee20138802a99cbf4590c7ef52bd6e4a2a3f159af8430f5f625d37e924b3b8cd10af3f63f959d9cf0ba7f6cd632bc188a45a4618a01cd619234d10 SHA512 60db6e270708b22f069df4ce25ea92a86de8ff6b09baa50bf1aa600b36dbf30f0de35aa7c7c4cfbcdc4ec8b235dd033e57838f98b0768749bc1a74d42163f530
DIST python-prefix-gentoo-3.9.6_p1-patches-r0.tar.xz 6984 BLAKE2B 8b032d3000fd2dfcb8e099ac071c1a911ba2a0e30343788f7191043800f9d0088307cd7007b2b3f6cc7d2f315fc22bbac5990fed81f0dd8d60dca0314bd59b88 SHA512 76c56895c99ee203bd266f475766d2572659939abaf478932e7c9c65ddc52cb5e012e23c9455dd0a4bf0281a07c70e23a2fea8337c693b8a4ac8abb534e21982
diff --git a/dev-lang/python/python-3.9.12.ebuild b/dev-lang/python/python-3.9.12.ebuild
new file mode 100644
index 0000000000..6ac508e466
--- /dev/null
+++ b/dev-lang/python/python-3.9.12.ebuild
@@ -0,0 +1,475 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+WANT_LIBTOOL="none"
+
+inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \
+ python-utils-r1 toolchain-funcs verify-sig
+
+MY_PV=${PV/_rc/rc}
+MY_P="Python-${MY_PV%_p*}"
+PYVER=$(ver_cut 1-2)
+PATCHSET="python-gentoo-patches-${MY_PV}"
+PREFIX_PATCHSET="python-prefix-gentoo-${MY_PV}-patches-r0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="
+ https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
+ https://dev.gentoo.org/~grobian/distfiles/${PREFIX_PATCHSET}.tar.xz
+ verify-sig? (
+ https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
+ )
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="PSF-2"
+SLOT="${PYVER}"
+KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="aqua bluetooth build examples gdbm hardened lto +ncurses pgo +readline +sqlite +ssl test tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="
+ app-arch/bzip2:=
+ app-arch/xz-utils:=
+ dev-lang/python-exec[python_targets_python3_9(-)]
+ dev-libs/libffi:=
+ kernel_linux? ( sys-apps/util-linux:= )
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:=[berkdb] )
+ ncurses? ( >=sys-libs/ncurses-5.2:= )
+ readline? ( >=sys-libs/readline-4.1:= )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? ( >=dev-libs/openssl-1.1.1:= )
+ tk? (
+ >=dev-lang/tcl-8.0:=
+ >=dev-lang/tk-8.0:=
+ dev-tcltk/blt:=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:= )
+"
+# bluetooth requires headers from bluez
+DEPEND="
+ ${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+"
+BDEPEND="
+ virtual/awk
+ virtual/pkgconfig
+ sys-devel/autoconf-archive
+ verify-sig? ( sec-keys/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]
+"
+RDEPEND+="
+ !build? ( app-misc/mime-types )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
+
+# large file tests involve a 2.5G file being copied (duplicated)
+CHECKREQS_DISK_BUILD=5500M
+
+QA_PKGCONFIG_VERSION=${PYVER}
+
+pkg_pretend() {
+ use test && check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ use test && check-reqs_pkg_setup
+}
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
+ fi
+ default
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ # Prefix' round of patches
+ "${WORKDIR}"/${PREFIX_PATCHSET}
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
+
+ # workaround a problem on ppc-macos with >=GCC-8 where dtoa gets
+ # miscompiled when optimisation is being used
+ if [[ ${CHOST} == powerpc*-darwin* ]] && \
+ tc-is-gcc && [[ $(gcc-major-version) -ge 8 ]] ;
+ then
+ sed -i \
+ -e '/^CFLAGS_ALIASING=/s/$/ -fno-tree-ter/' Makefile.pre.in || die
+ fi
+
+ # Darwin 9's kqueue seems to act up (at least at this stage), so
+ # make Python's selectors resort to poll() or select()
+ if [[ ${CHOST} == powerpc*-darwin9 ]] ; then
+ sed -i \
+ -e 's/KQUEUE/KQUEUE_DISABLED/' \
+ configure.ac configure || die
+ fi
+
+ if [[ ${CHOST} == *-darwin19 ]] ; then
+ # HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH is set because
+ # _dyld_shared_cache_contains_path could be found, yet it cannot
+ # be resolved when dlopen()ing, so simply pretend it doesn't
+ # exist here
+ sed -i \
+ -e 's/_dyld_shared_cache_contains_path/disabled&/' \
+ configure.ac configure || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # https://bugs.gentoo.org/700012
+ if is-flagq -flto || is-flagq '-flto=*'; then
+ append-cflags $(test-flags-CC -ffat-lto-objects)
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ if use aqua ; then
+ ECONF_SOURCE="${S}" OPT="" \
+ econf \
+ --enable-framework="${EPREFIX}" \
+ --config-cache
+ fi
+
+ # flock on 32-bits sparc Solaris is broken
+ [[ ${CHOST} == sparc-*-solaris* ]] && \
+ export ac_cv_flock_decl=no
+
+ if use pgo; then
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
+
+ # All of these seem to occasionally hang for PGO inconsistently
+ # They'll even hang here but be fine in src_test sometimes.
+ # bug #828535 (and related: bug #788022)
+ PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
+
+ if has_version "app-arch/rpm" ; then
+ # Avoid sandbox failure (attempts to write to /var/lib/rpm)
+ PROFILE_TASK+=" -x test_distutils"
+ fi
+ fi
+
+ local myeconfargs=(
+ # glibc-2.30 removes it; since we can't cleanly force-rebuild
+ # Python on glibc upgrade, remove it proactively to give
+ # a chance for users rebuilding python before glibc
+ # except on non-glibc systems this breaks the build, so be
+ # conservative!
+ $(use elibc_glibc && echo ac_cv_header_stropts_h=no)
+
+ $(use aqua && echo --config-cache)
+ --enable-shared
+ --enable-ipv6
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --with-system-expat
+ --with-system-ffi
+
+ $(use_with lto)
+ $(use_enable pgo optimizations)
+ )
+
+ # disable implicit optimization/debugging flags
+ local -x OPT=
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ local -x CFLAGS_NODIST=${CFLAGS}
+ local -x LDFLAGS_NODIST=${LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+
+ econf "${myeconfargs[@]}"
+
+ if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+ # Prevent using distutils bundled by setuptools.
+ # https://bugs.gentoo.org/823728
+ export SETUPTOOLS_USE_DISTUTILS=stdlib
+
+ # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
+ # end up writing bytecode & violating sandbox.
+ # bug #831897
+ local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
+
+ if use pgo ; then
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ addpredict /usr/lib/python3.9/site-packages
+ fi
+
+ # also need to clear the flags explicitly here or they end up
+ # in _sysconfigdata*
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Restore saved value from above.
+ local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax-kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ if use sparc ; then
+ # bug #788022
+ skipped_tests+=" multiprocessing_fork"
+ skipped_tests+=" multiprocessing_forkserver"
+ fi
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ if use aqua ; then
+ # avoid config.status to be triggered
+ find Mac -name "Makefile" -exec touch \{\} + || die
+
+ # Python_Launcher is kind of a wrapper, and we should fix it for
+ # Prefix (it uses /usr/bin/pythonw) so useless
+ # IDLE doesn't run, no idea, but definitely not used
+ emake DESTDIR="${D}" -C Mac install_Python || die
+ rmdir "${ED}"/Applications/Python* || die
+ rmdir "${ED}"/Applications || die
+
+ local fwdir=/Frameworks/Python.framework/Versions/${PYVER}
+ ln -s "${EPREFIX}"/usr/include/python${PYVER} \
+ "${ED}${fwdir}"/Headers || die
+ ln -s "${EPREFIX}"/usr/lib/libpython${PYVER}.dylib \
+ "${ED}${fwdir}"/Python || die
+ fi
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ # Fix collisions between different slots of Python.
+ rm "${ED}/usr/$(get_libdir)/libpython3$(get_libname)" || die
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}/usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}/usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax-kernel]; then
+ pax-mark E "${ED}/usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}/usr/bin/${abiver}"
+ fi
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ if use aqua ; then
+ # we do framework, so the emake trick below returns a pathname
+ # since that won't work here, use a (cheap) trick instead
+ local libname=libpython${PYVER}
+ else
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ fi
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -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
+ local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile)
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${PWD}
+ 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 scriptdir=${D}$(python_get_scriptdir)
+ mkdir -p "${scriptdir}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${scriptdir}/python${pymajor}" || die
+ ln -s "python${pymajor}" "${scriptdir}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${scriptdir}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${scriptdir}/python-config" || die
+ # 2to3, pydoc
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${scriptdir}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${scriptdir}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${scriptdir}/idle" || die
+ fi
+}
next reply other threads:[~2022-05-11 20:18 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 20:18 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-12 18:22 [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/python/ Fabian Groffen
2025-04-12 15:27 Fabian Groffen
2025-04-12 15:27 Fabian Groffen
2024-04-11 11:31 Fabian Groffen
2024-04-09 14:41 Fabian Groffen
2024-04-09 11:03 Fabian Groffen
2024-04-06 20:09 Fabian Groffen
2024-01-23 8:31 Fabian Groffen
2024-01-23 8:06 Fabian Groffen
2024-01-21 13:40 Fabian Groffen
2024-01-21 12:02 Fabian Groffen
2024-01-15 16:34 Sam James
2023-06-28 6:27 Fabian Groffen
2023-06-01 6:41 Fabian Groffen
2023-05-05 7:05 Fabian Groffen
2023-05-04 17:10 Fabian Groffen
2023-05-04 7:34 Fabian Groffen
2023-05-03 7:11 Fabian Groffen
2023-05-03 6:20 Fabian Groffen
2023-05-02 18:47 Fabian Groffen
2023-01-05 9:32 Fabian Groffen
2022-06-08 11:04 Fabian Groffen
2022-05-12 17:10 Fabian Groffen
2022-04-14 17:05 Fabian Groffen
2022-01-23 1:38 Sam James
2022-01-23 1:38 Sam James
2022-01-23 1:21 Sam James
2021-08-22 12:42 Fabian Groffen
2021-08-15 11:00 Fabian Groffen
2021-08-15 11:00 Fabian Groffen
2021-04-10 14:53 Fabian Groffen
2021-04-04 8:42 Fabian Groffen
2021-02-18 8:00 Fabian Groffen
2021-01-21 11:15 Fabian Groffen
2021-01-08 15:23 Fabian Groffen
2021-01-06 11:57 Fabian Groffen
2021-01-04 10:53 Fabian Groffen
2021-01-02 14:19 Fabian Groffen
2021-01-02 9:54 Fabian Groffen
2021-01-01 20:37 Fabian Groffen
2021-01-01 17:46 Fabian Groffen
2020-12-31 21:06 Fabian Groffen
2020-12-26 19:16 Fabian Groffen
2020-12-26 13:05 Fabian Groffen
2020-12-16 7:21 Fabian Groffen
2020-12-15 19:43 Fabian Groffen
2020-12-11 14:31 Fabian Groffen
2020-11-23 20:08 Fabian Groffen
2020-08-02 11:14 Fabian Groffen
2020-06-23 18:34 Fabian Groffen
2020-06-04 13:33 Fabian Groffen
2020-06-04 12:39 Fabian Groffen
2020-05-31 17:13 Fabian Groffen
2020-05-31 12:04 Fabian Groffen
2020-05-30 16:34 Fabian Groffen
2019-06-18 14:01 Fabian Groffen
2019-03-25 6:02 Fabian Groffen
2019-03-24 20:44 Fabian Groffen
2019-03-22 13:37 Fabian Groffen
2019-03-22 13:37 Fabian Groffen
2019-03-22 13:08 Fabian Groffen
2019-03-22 10:38 Fabian Groffen
2019-03-22 9:55 Fabian Groffen
2019-02-25 9:58 Michael Haubenwallner
2019-02-19 12:00 Fabian Groffen
2019-02-18 14:51 Michael Haubenwallner
2019-02-14 17:00 Michael Haubenwallner
2019-02-14 11:38 Michael Haubenwallner
2018-06-01 20:02 Fabian Groffen
2018-05-03 12:05 Fabian Groffen
2018-05-03 12:05 Fabian Groffen
2018-04-07 14:03 Fabian Groffen
2018-04-04 18:14 Fabian Groffen
2018-01-22 15:38 Michael Haubenwallner
2017-12-29 22:35 Michael Haubenwallner
2017-12-29 22:25 Michael Haubenwallner
2017-12-29 13:25 Fabian Groffen
2017-12-27 18:35 Fabian Groffen
2017-10-30 16:53 Fabian Groffen
2017-08-24 19:07 Fabian Groffen
2017-08-20 8:49 Fabian Groffen
2016-07-01 15:50 Fabian Groffen
2016-07-01 15:50 Fabian Groffen
2016-07-01 14:31 Fabian Groffen
2016-05-12 13:41 Michael Haubenwallner
2016-02-18 17:28 Fabian Groffen
2016-02-02 20:06 Fabian Groffen
2016-02-01 19:08 Fabian Groffen
2016-01-24 13:30 Fabian Groffen
2016-01-24 13:21 Fabian Groffen
2016-01-24 13:21 Fabian Groffen
2016-01-24 13:21 Fabian Groffen
2016-01-24 13:21 Fabian Groffen
2016-01-24 13:21 Fabian Groffen
2016-01-14 12:07 Fabian Groffen
2015-12-21 15:22 Fabian Groffen
2015-12-18 10:53 Fabian Groffen
2015-12-16 7:44 Fabian Groffen
2015-12-14 20:39 Fabian Groffen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1652300290.7e2a2e320eba675f3acab46e22647ca6514a329f.grobian@gentoo \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox