From 14bda3c9c57c13e8a59303f400678313fd770bdd Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 28 May 2023 21:15:34 +0100 Subject: gentoo auto-resync : 28:05:2023 - 21:15:34 --- dev-lang/python/Manifest | 6 +- dev-lang/python/python-3.12.0_alpha7.ebuild | 522 -------------------------- dev-lang/python/python-3.12.0_beta1_p1.ebuild | 522 ++++++++++++++++++++++++++ 3 files changed, 524 insertions(+), 526 deletions(-) delete mode 100644 dev-lang/python/python-3.12.0_alpha7.ebuild create mode 100644 dev-lang/python/python-3.12.0_beta1_p1.ebuild (limited to 'dev-lang/python') diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 67cc8f831bed..44f16290bb20 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -6,8 +6,6 @@ DIST Python-3.10.11.tar.xz 19640792 BLAKE2B ce281549cb8fdcb74e068cc76c5412af749a DIST Python-3.10.11.tar.xz.asc 833 BLAKE2B ba107904c1658374481636bc950187a7bd1a2fb33aa3fb2fd1343e5aec6e84afdadab0b2edc6f0768856ae7b847a592fc79a7476247f4ff67c38c1ff18f831e9 SHA512 edddacc81d4671851cd2a52853cabc53314fa226dac77c2248ee61cf7d58dd2f59301b7729b2ff9f5717b84268140c3bef30e358b80718c6c84b308bd560bcd8 DIST Python-3.11.3.tar.xz 19906156 BLAKE2B c23815e09a0012b2af03f3e18471389382978ef0991cb081c4c6410e98613589d47d3ad782c0a06a48ddd86fc5df7f1d59e93dbab5871b89559e225084544248 SHA512 a3bba4b69322a47bfeefe42ba0fd7331b5b67fd2ab41441e2219d16ef8c6f307f1a48977afd073c18cfd24ec6cb1bfe0c4bb4b273031eb524dc7e9fb5fbcc3b6 DIST Python-3.11.3.tar.xz.asc 833 BLAKE2B 1846858480428293047bfaf87a74f5a6cf28227f63dbc36e658ab68444a5b91c2178fca42f35a413591103a0ceeea3cd5f8b757fb2f42cbcad023c62970ab950 SHA512 34bfb6e74e2bbec15bf3f653e32a3d705961b5f724e3f4713cf9b6b530f9c9e7e94f5cf855798bdf9763235b97a60ec9ad554d24cdc793e21a0c39540b5818d8 -DIST Python-3.12.0a7.tar.xz 19819836 BLAKE2B e899a47228560219b9e2dd1520999a026bd198fa47867ef3da30f6817d85c2ba6fe3956d1da0a038a096d3e70227d43c53fab88329af7c3dd9652d8b30f89bca SHA512 181e73215666a7deb4286a70f506d788adb0d13e3b688f3c4e061819bc59cbcedaf8aca0251d4e58791be8488f43ca0075176335bd1b3ff496b4ea2f14967d8b -DIST Python-3.12.0a7.tar.xz.asc 963 BLAKE2B 9e1b223b5b0556f95fb6bacb1ae66cd6115f8b589eb8ad46d1fec7e4d64aa5cc12c993be5b1fc87966b6b1b6964d433c00920dd98de41380bd8a8ee9b4f98490 SHA512 07c27bfb649755cfe505a902ff677e146ed1e8e19e7d5801d41c5926359b7d3f2ef73961c26f6cce6dd948355324330d4e9bae79e3661f87079b1adb5bf62355 DIST Python-3.12.0b1.tar.xz 20053428 BLAKE2B b5b0df040de6cff181689f7c53e09407ef3a92806a688faa8547b2c6a0adc1622ea15cc5efb0d1b96a711cbf16f73a1d5f8fa748983bc423e4bbe89bd6ff84a6 SHA512 7d6d009f765ba48ef48e6b25cb1f043ba66979d66cb9141452862e84ae954611361d24178cce628d1892b75d306370a56fcb30a7c1715b0eedcfef5610f3e1ae DIST Python-3.12.0b1.tar.xz.asc 963 BLAKE2B e80cbc9cf93756b6efbce3037dfcd4fec310ce17a3db36f33ac617dae63a8c2abc8efb3cfd5ec42299b9e4c2bdd06a3405c50b5550869564ae5f6a6d79d596c9 SHA512 cea449f05ae66c28aeb4ffd99b5748ba4c09bfb2a6889a771744ea81ca2afc2420648d4ca92592d32ddb26660804e73912e6fb8d906674e9e1895ba613904b26 DIST Python-3.8.16.tar.xz 19046724 BLAKE2B cbdeec7961d39cb9ab4960760b5d4c7ae71675c174156aa9f6fca55ee92a93a937ef39defe86e423237a25e0e24703233ce4b91dc97005b6ffc1f342ddd9e22c SHA512 d206e80806409410c00ef8acd8c3d90e3cc9553f996d0a57faa63802f2415e9d7591542b2e84b5e8e79245f40f6478790b5ba2acf1da98ebbc9495999183f7fd @@ -17,15 +15,15 @@ DIST Python-3.9.16.tar.xz.asc 833 BLAKE2B 416b4a4be06e101c5971c12a6f21229c425bca DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f DIST python-gentoo-patches-3.10.11.tar.xz 13984 BLAKE2B 00c682609876756f61d41f637d0354538823dd713c81f8a3a168d217c515d4559d24e1988c1796b2b920f3962f56e023758b292175d29d5348a87bd8b422f6e7 SHA512 f819113908bc689bb522d2cbe749c658a6b29e7f627718954b12797461a13781352b01f798e2f42b3741a0a0489049bf03405ead4ac8103a025dac11e72b0888 DIST python-gentoo-patches-3.11.3.tar.xz 7776 BLAKE2B 78bf26f554c608c68826b9ea3c63a1df2b45bff755860f39f14306ebb63f17f5111b117519c4a9cb30452a62a14a3a7393798b8920c3d108ec8b6a30db88641e SHA512 64b79c90055fd940590b72ffd3744fe02ab9e46caf7b46f4aa1d074bf3e62d355e128bb2ac68c42f228f2e1bcdee2b0b114d9e2b9bf8427512083c1c5f8680e8 -DIST python-gentoo-patches-3.12.0a7.tar.xz 5168 BLAKE2B bfc249bf634deb3fab283c5d9a1710e35e6e7331f6a4f5c0d6b3795a3419adb7fa017117496966f7b3d7430d7564c66088cfd7cb8a2b8406776f42a5801960a7 SHA512 f806aa788f86d516bb23ad255edc24716a9385b3092e06e02e83617ef103b04878bb404081e7dded9c194dd6f2e4362bc2643b61076cb387b6070be3af391651 DIST python-gentoo-patches-3.12.0b1.tar.xz 4652 BLAKE2B fcc0b2a8dddb4857e3bd381eb04ddbb593c18e4a3c7e565bc9d386e010f4ddfbb83ed479bd054e51055f30294f7065b045efabb6d45d0be41142dd450f1cada3 SHA512 ce39f99e54c44099a4fbd6da868af3c600320c39e2723b7958a40dfb2ff838e425ef0a87907cb084d96d059054f6222c211ebd258aec255f5fa97579cf9014c7 +DIST python-gentoo-patches-3.12.0b1_p1.tar.xz 73068 BLAKE2B 6728a4dcc102cc73e0e3a7e835e25df21075727e3096769f21df1e5411ebe1ad2d9909119bb6a12f96c932cf43de69fda122dffa3c88608c3b4acd76147153b3 SHA512 a459e341418d1882067d0d228401b9ce1365cdaeb75825ca0115add3c5499103986692d0a4fbdf20001632c03eba21171390326ccada6ab3f3c804448bdb79f0 DIST python-gentoo-patches-3.8.16_p4.tar.xz 32436 BLAKE2B 76984bbc04e5cf32d70853891967a33366dd28ca2cd47f3538ed1e9f4d39008d04c90f616d92112f5ec3468c42119089d195ee4d936536f8da4a772164aae221 SHA512 ad6d653fec3cce1f73db4b192f7e95b35ae2cf70aa8782d7b69f9d48eee240ef1cc32257a42bbb57f3952720df68b9976164a0b2748e36600332fba488383016 DIST python-gentoo-patches-3.9.16_p3.tar.xz 27160 BLAKE2B 5a41a6ff135c3aca02b19cf9a61f554ca224173854274b872ce85e8c71f25c678604e50b87bae40d4b5ac082731c143338fcc6ef47acebad2b59ce0b1d600f5d SHA512 1ace0a9e929769c29082fdec6845a476c07c13fbbff8726a7a592fda09da8b50c996638b4e4e40acccb15630a796074329adbcc9a004c4305952fa5b0dc4146c EBUILD python-2.7.18_p16-r1.ebuild 8612 BLAKE2B f6c315dcdc3df5d88b456823a2f18cc5fb9e63d8e7b3686a25a814e6222a0787a0b0e1a9373297b14eea9706aa68b6fa36c49a3a4ecf42d3967bf09ca4ca872a SHA512 8234c63e15aa33327bf9cf86f08621b319ba0d7e0826c1159a53b030eab02cf64cd13f1ddce4c250c291eca7a853e0cc420bb549085fd2d11a4dabc0a9d61543 EBUILD python-3.10.11.ebuild 14078 BLAKE2B 3de1a751782976b1adfc4950658e0f012e48076d91edb6f28bf4f9287931c98c3e9a27b6675f8d30e6a24e49b5c3fa5080c9bb2c2e25b4580bf1bd5fd7c7a5f2 SHA512 6d40f5d4b2e892d120e9449a77ba64f31254f5598b4b97556108f42dfc9a1408e472a3b6a67cc0a136cb8a514deb704a043a86dbc09c80b2a5f80a6ab6255acf EBUILD python-3.11.3.ebuild 14977 BLAKE2B 612ba968eb676969985c92cf764ba2a112fa17d0dda437439b2c4c3f0f79712c1328039ddee1d5e6c75be23556459c2bcb66a976612887e1f1ebc0d535e5cd36 SHA512 3d506ec64d0d17921db1a81f7606633b38f5aabc06d01b10cdbdd2022eb830d3985c75079314846a52ebf4e62bd26b2c0cd2d59b23dd2c75a4f9a7ccc1a54a58 -EBUILD python-3.12.0_alpha7.ebuild 14815 BLAKE2B f27909a68630a37f3266a4d155adf2d2ae88b7f4da3cbef7592529c0245c4c93c898d3ca8dac87f5e68e876ee4ffc3322af4e2b6eb2227cfb3566a34e60c3720 SHA512 cc35f1092408595e581cbf4f21ee99ea9f7b15d3afc86236e42659900a8080f2b57f0d6e4747674b8c45ed7f35ee7284808b48488afa4be7d5cd3c565b6a7aac EBUILD python-3.12.0_beta1.ebuild 14814 BLAKE2B ba07a808ccd941eb374d6504894e5fad90372aa651386d8aa9f48b6e3e2497cd8e43f1e59a18398d55d180955e7f14b099d7d81796c8e17a1a2bb4d284b0a252 SHA512 6372e4388a5f8eee265dd173b8648346ad39cc21080095f068b6f18ff17d9d2e3989efd230e1d42d73f2fa9b4a0b9b0b0902f642266552f22aabc156ca6b5250 +EBUILD python-3.12.0_beta1_p1.ebuild 14814 BLAKE2B ba07a808ccd941eb374d6504894e5fad90372aa651386d8aa9f48b6e3e2497cd8e43f1e59a18398d55d180955e7f14b099d7d81796c8e17a1a2bb4d284b0a252 SHA512 6372e4388a5f8eee265dd173b8648346ad39cc21080095f068b6f18ff17d9d2e3989efd230e1d42d73f2fa9b4a0b9b0b0902f642266552f22aabc156ca6b5250 EBUILD python-3.8.16_p4.ebuild 12195 BLAKE2B 7dcc6fb88eb5a36747eeca7bffb25ca8924969e1c024704f18159d9bb02e24a8ba95caa9a0e001c1e01f3953ffcf6f5414ee86d3f9e8666ccb317c26c045f150 SHA512 884acc58a6b77594ac0aa11d79d0d09c8dfbd317834f11ca1b2041eea5a4c1d0a5cc7710e6902b8e83ec3cba858beed5f7a82563eba5af6243fcf1583c6cac7f EBUILD python-3.9.16_p3-r1.ebuild 13678 BLAKE2B 9a072504fe4fdd3c2fc1a92a2378b81d2edc3e02bac9059a1ef493c01306182c49cce813f8570935872fc8dd552899f236f18eadc8dd4643583812177e611a89 SHA512 09a31e35ab91f5ad3445e982b8b2c71a0fbb74b91d53513ea461d5e22c374fe16984664b216f4428730a9839c728f8925a1e1145fe999874693dcd795eeaf12d MISC metadata.xml 1436 BLAKE2B fd5ebcef153bc74aae02f8930dba67736ce44b1dd23418448e7d5bd22391845f5edf0ba8cdf3f43af9254c68734b95fbac9ee891f09c4584c9272ac4233eede6 SHA512 124a1e743cef7236f7936aa843d3aae739a420b1b6173f02c2ef787745616891142724446320d887aeecb95fac09e3620a9666e8e3e32085d79019fe71ff7da5 diff --git a/dev-lang/python/python-3.12.0_alpha7.ebuild b/dev-lang/python/python-3.12.0_alpha7.ebuild deleted file mode 100644 index 41b53e19a104..000000000000 --- a/dev-lang/python/python-3.12.0_alpha7.ebuild +++ /dev/null @@ -1,522 +0,0 @@ -# Copyright 1999-2023 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 -inherit prefix python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_alpha/a} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE=" - https://www.python.org/ - https://github.com/python/cpython/ -" -SRC_URI=" - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE=" - bluetooth build debug +ensurepip examples gdbm hardened libedit lto - +ncurses pgo +readline +sqlite +ssl test tk valgrind -" -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:= - app-crypt/libb2 - >=dev-libs/expat-2.1:= - dev-libs/libffi:= - dev-python/gentoo-common - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - ensurepip? ( dev-python/ensurepip-wheels ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - kernel_linux? ( sys-apps/util-linux:= ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( - !libedit? ( >=sys-libs/readline-4.1:= ) - libedit? ( dev-libs/libedit:= ) - ) - 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 - ) - !! /dev/null || die - # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating - # libdir correctly for cross. - PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ - ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" - - # Avoid as many dependencies as possible for the cross build. - cat >> Makefile <<-EOF || die - MODULE_NIS_STATE=disabled - MODULE__DBM_STATE=disabled - MODULE__GDBM_STATE=disabled - MODULE__DBM_STATE=disabled - MODULE__SQLITE3_STATE=disabled - MODULE__HASHLIB_STATE=disabled - MODULE__SSL_STATE=disabled - MODULE__CURSES_STATE=disabled - MODULE__CURSES_PANEL_STATE=disabled - MODULE_READLINE_STATE=disabled - MODULE__TKINTER_STATE=disabled - MODULE_PYEXPAT_STATE=disabled - MODULE_ZLIB_STATE=disabled - EOF - - # Unfortunately, we do have to build this immediately, and - # not in src_compile, because CHOST configure for Python - # will check the existence of the --with-build-python value - # immediately. - PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake - popd &> /dev/null || die - fi - - # 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= - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - if use ncurses; then - append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - fi - - hprefixify setup.py - 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 - - # force-disable modules we don't want built - local disable_modules=( NIS ) - use gdbm || disable_modules+=( _GDBM _DBM ) - use sqlite || disable_modules+=( _SQLITE3 ) - use ssl || disable_modules+=( _HASHLIB _SSL ) - use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) - use readline || disable_modules+=( READLINE ) - use tk || disable_modules+=( _TKINTER ) - - local mod - 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() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - export PYTHONSTRICTEXTENSIONBUILD=1 - - # 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/python${PYVER}/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 - - # this just happens to skip test_support.test_freeze that is broken - # without bundled expat - # TODO: get a proper skip for it upstream - local -x LOGNAME=buildbot - - local test_opts=( - -u-network - -j "$(makeopts_jobs)" - - # fails - -x test_gdb - ) - - if use sparc ; then - # bug #788022 - test_opts+=( - -x test_multiprocessing_fork - -x test_multiprocessing_forkserver - ) - fi - - # workaround docutils breaking tests - cat > Lib/docutils.py <<-EOF || die - raise ImportError("Thou shalt not import!") - EOF - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite "/usr/lib/python${PYVER}/site-packages" - - nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local ret=${?} - - rm Lib/docutils.py || die - - [[ ${ret} -eq 0 ]] || die "emake test failed" -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - # the Makefile rules are broken - # https://github.com/python/cpython/issues/100221 - mkdir -p "${libdir}"/lib-dynload || die - - # -j1 hack for now for bug #843458 - emake -j1 DESTDIR="${D}" altinstall - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || 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 - - rm -r "${libdir}"/ensurepip/_bundled || die - if ! use ensurepip; then - rm -r "${libdir}"/ensurepip || die - fi - if ! use sqlite; then - rm -r "${libdir}/"sqlite3 || die - fi - if ! use tk; then - rm -r "${ED}/usr/bin/idle${PYVER}" || die - rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - fi - - ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || 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 - local libname=$( - printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | - emake --no-print-directory -s -f - 2>/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 - 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 -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 3.11.0_beta4-r2; then - ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" - ewarn "installed previously are no longer valid and will be regenerated" - ewarn "(or ignored) on the next import. This may cause sandbox failures" - ewarn "when installing some packages and checksum mismatches when removing" - ewarn "old versions. To actively prevent this, rebuild all packages" - ewarn "installing Python 3.11 modules, e.g. using:" - ewarn - ewarn " emerge -1v /usr/lib/python3.11/site-packages" - fi - done -} diff --git a/dev-lang/python/python-3.12.0_beta1_p1.ebuild b/dev-lang/python/python-3.12.0_beta1_p1.ebuild new file mode 100644 index 000000000000..14f92570e8f9 --- /dev/null +++ b/dev-lang/python/python-3.12.0_beta1_p1.ebuild @@ -0,0 +1,522 @@ +# Copyright 1999-2023 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 +inherit prefix python-utils-r1 toolchain-funcs verify-sig + +MY_PV=${PV/_beta/b} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build debug +ensurepip examples gdbm hardened libedit lto + +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +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:= + app-crypt/libb2 + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + 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 + ) + !! /dev/null || die + # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Avoid as many dependencies as possible for the cross build. + cat >> Makefile <<-EOF || die + MODULE_NIS_STATE=disabled + MODULE__DBM_STATE=disabled + MODULE__GDBM_STATE=disabled + MODULE__DBM_STATE=disabled + MODULE__SQLITE3_STATE=disabled + MODULE__HASHLIB_STATE=disabled + MODULE__SSL_STATE=disabled + MODULE__CURSES_STATE=disabled + MODULE__CURSES_PANEL_STATE=disabled + MODULE_READLINE_STATE=disabled + MODULE__TKINTER_STATE=disabled + MODULE_PYEXPAT_STATE=disabled + MODULE_ZLIB_STATE=disabled + EOF + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake + popd &> /dev/null || die + fi + + # 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= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + hprefixify setup.py + 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 + + # force-disable modules we don't want built + local disable_modules=( NIS ) + use gdbm || disable_modules+=( _GDBM _DBM ) + use sqlite || disable_modules+=( _SQLITE3 ) + use ssl || disable_modules+=( _HASHLIB _SSL ) + use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) + use readline || disable_modules+=( READLINE ) + use tk || disable_modules+=( _TKINTER ) + + local mod + 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() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + export PYTHONSTRICTEXTENSIONBUILD=1 + + # 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/python${PYVER}/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 + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite "/usr/lib/python${PYVER}/site-packages" + + nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # the Makefile rules are broken + # https://github.com/python/cpython/issues/100221 + mkdir -p "${libdir}"/lib-dynload || die + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || 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 + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || 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 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/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 + 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 +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 3.11.0_beta4-r2; then + ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" + ewarn "installed previously are no longer valid and will be regenerated" + ewarn "(or ignored) on the next import. This may cause sandbox failures" + ewarn "when installing some packages and checksum mismatches when removing" + ewarn "old versions. To actively prevent this, rebuild all packages" + ewarn "installing Python 3.11 modules, e.g. using:" + ewarn + ewarn " emerge -1v /usr/lib/python3.11/site-packages" + fi + done +} -- cgit v1.2.3