From 9750e129d5a7d80e12fd9bba1859dacd85832c20 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 28 Feb 2023 14:43:37 +0100 Subject: [PATCH] dev-lang/python-oem: Update to 3.10.10_p2 So we have matching versions of python in OEM and SDK. --- .../dev-lang/python-oem/Manifest | 6 +- .../dev-lang/python-oem/README.md | 45 ----- ...r1.ebuild => python-oem-3.10.10_p2.ebuild} | 161 ++++++++++-------- 3 files changed, 97 insertions(+), 115 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/README.md rename sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/{python-oem-3.10.9-r1.ebuild => python-oem-3.10.10_p2.ebuild} (74%) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/Manifest b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/Manifest index 5cebbd8384..a60f8dcf2a 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/Manifest @@ -1,3 +1,3 @@ -DIST Python-3.10.9.tar.xz 19612112 BLAKE2B ef2d063a9fbaf234aa4a47149cb184a0379dc403515df10249104a5092750cdaf22ad47916d34e17dd68fff1c30338c0375f4e4e3cc9bde33e0896c1c3ba655b SHA512 d66ea8adeb6dc4951e612175f8838b3092967ff275b7a3470f2d86f470036aa2221e722c3144d90bcd230b88efd53dde204213f72f703e524e4b833e2ccc68e2 -DIST Python-3.10.9.tar.xz.asc 833 BLAKE2B 8895c6cb5031b2463cc6ba3e0dc56bee40c2e99117c062f9c72f2b7adb0d5a49782b968abfc764117e8513bd12816915245677c25b1710e3dae3c9e26937c2b9 SHA512 525e166ede6836086de814c26fc880f41eaf1ed4bff6118f00342e42f7ab1c47148447ced1b565e146d3125fa06b5cd6b394a256bc61096766b26e07f18bbf10 -DIST python-gentoo-patches-3.10.9.tar.xz 12216 BLAKE2B ced4f951089c51ddaab6c62ade9d2c84f69e7e1baf2acf5247559534c7d0fb0e88dca1222f5bd2209b4e61f5aca17279b8054f269535dbc10de0786c2c5779f5 SHA512 2d01f0f3831beeba004517bb82f7d616f25f08e5c755409ecff79cd68e0a619b5bf6802fffd0e5f7f39f1d9d93e65b018b91cdeb337a5e47f1651f36bea0e96e +DIST Python-3.10.10.tar.xz 19627028 BLAKE2B 57fc6869fa05586158a170c1892d93a3036823bfafb9484b9d70bca6cdc3e76f75357622eace4bde9a4c0ca62a1bb79665e5751b41655f9f4d7e345547013ad8 SHA512 f0aee65970a68287b34c4eafcf35c6fa09c81ba234ac356db16fbbc6c36417e4ac67071e616d118f5e192d541d7f177dcab5585b9780e842f656c09e01c37ced +DIST Python-3.10.10.tar.xz.asc 833 BLAKE2B fd60e6268f7dd6676ea58bd7e80c513506ac9810c1a62ff060134207b0fd8e7b096d5f11f3cc536a1578144ff54c00bcb076d3c3f5889a69a898660dd280312b SHA512 591746d74c6123bf36c763b6e8e1de1554f02eeff30c855623ef0f12d3864d5573eb5efe96d6e142f24627c77b90738ada3456df4ad59bddcb008658f2ca8af9 +DIST python-gentoo-patches-3.10.10_p2.tar.xz 13992 BLAKE2B e18e708888dd28c8f238d4897aff79483a679396a168d8b5ff4f5e8c7f09cec5f1b13aeb327d3dc3e2149c2117c25da050987f1f1c3322b56c87245ba2d0b54d SHA512 14bc218a2f3c64ef9f42682fd1364208bcaa74f787dee39bd9566e40764c260a65fd42961be47a6e6c6227091cb2fef83e1d689302448647560689e20e07efe0 diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/README.md b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/README.md deleted file mode 100644 index 12b071faeb..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/README.md +++ /dev/null @@ -1,45 +0,0 @@ -Modifications made: - -- Keep using internal expat and libffi, thus dropping dev-libs/libffi - and dev-libs/expat from the dependencies. - -- Drop dev-python/gentoo-common dependency, it provides the - EXTERNALLY-MANAGED file, but we will provide our own. - -- Since this package is installed only for OEM partition as a binary - package, and the installation there happens after the packages - database is removed, we unset the RDEPEND variable. The RDEPEND - variable needs to be empty as it's also used during the binary - package installation. The contents of RDEPEND are already inside the - DEPEND variable, so we are safe. - -- We modify the configure flags: - - - Add `--prefix=/usr/share/oem/python` as `/usr/share/oem` is where - the OEM partition is mounted. - - - Add `--with-platlibdir="$(get_libdir)"`, this is to make sure that - consistent library directory gets picked. In our case for both - amd64 and arm64, it's lib64. - - - Change `--enable-shared` to `--disable-shared`. This will skip - building dynamic libraries, as we don't need them. - - - Add `--includedir=/discard/include` and change `--mandir` and - `--infodir` to also use `/discard` to install files there. Makes - it easy to remove the unnecessary files. - - - We disable loadable sqlite extensions. - - - As we want to use the internal versions of expat and libffi, we - change `--with-system-{expat,ffi}` to - `--without-system-{expat,ffi}`. - - - Comment out the `--with-wheel-pkg-dir` as it's some ensurepip - stuff we are disabling anyway. - -- Essentially drop `src_install` and write our own variant, where we - run `make altinstall`, remove unnecessary files (the original - `src_install` could be read to find out which files to remove), - creates a versionless python symlink, adds an EXTERNALLY-MANAGED - file, and removes the `/discard` directory. diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-3.10.9-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-3.10.10_p2.ebuild similarity index 74% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-3.10.9-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-3.10.10_p2.ebuild index 25cd1da064..fd104f5ca5 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-3.10.9-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/dev-lang/python-oem/python-oem-3.10.10_p2.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk valgrind +xml @@ -40,13 +40,11 @@ RESTRICT="!test? ( test )" # run the bootstrap code on your dev box and include the results in the # patchset. See bug 447752. -# Flatcar: Drop a dependency on dev-libs/expat, we will use the internal one. -# Flatcar: Drop a dependency on dev-libs/libffi, we will use the internal one. -# Flatcar: Drop a dependency on dev-python/gentoo-common, we will install our own EXTERNALLY-MANAGED file RDEPEND=" app-arch/bzip2:= app-arch/xz-utils:= dev-lang/python-exec[python_targets_python3_10(-)] + dev-libs/libffi:= dev-python/gentoo-common sys-apps/util-linux:= >=sys-libs/zlib-1.1.3:= @@ -67,6 +65,7 @@ RDEPEND=" dev-tcltk/blt:= dev-tcltk/tix ) + xml? ( >=dev-libs/expat-2.1:= ) !!/dev/null + ) + newins 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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${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 - - rm -r "${ED}/discard" || die + 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 }