summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-02-19 17:45:56 +0100
committerMichał Górny <mgorny@gentoo.org>2021-02-19 17:45:56 +0100
commitee54a40e71ded20b3f9546bbf5a23437e6bb5e8c (patch)
treeed422913f99d712072ccb83c7c0d9c2cf03efc98 /dev-lang
parentapp-editors/mousepad: Remove old (diff)
downloadgentoo-ee54a40e71ded20b3f9546bbf5a23437e6bb5e8c.tar.gz
gentoo-ee54a40e71ded20b3f9546bbf5a23437e6bb5e8c.tar.bz2
gentoo-ee54a40e71ded20b3f9546bbf5a23437e6bb5e8c.zip
dev-lang/python: Bump to 3.8.8
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/Manifest3
-rw-r--r--dev-lang/python/python-3.8.8.ebuild338
2 files changed, 341 insertions, 0 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 9e18e4204c61..8955c1760327 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -12,6 +12,8 @@ DIST Python-3.7.9.tar.xz 17389636 BLAKE2B 484833aa2aa4e29051a02969294f72099ff6f1
DIST Python-3.7.9.tar.xz.asc 833 BLAKE2B a95546b90ff87c13492d7f6e0d8e6d263557ffb55f72de212ec21ef5fb6b3c838e0a13c5696d577d1d7c46d0386698e8860d9819e6510e85aa88709011fe1e72 SHA512 922da6056029416e1dceefb83723911d5e2cc972d88c0bf1a08c35c8fe11279eb350c44834d2cc5ba94beb9b7655ecae28d8f5b6e3479eea7fcd09f67ec1e1c0
DIST Python-3.8.7.tar.xz 18261096 BLAKE2B 6ac20efef41e828cb796aabcb7808400d494b9b48759950c8c15ee90762394f6763163d8e37ab407c1c79ebb9cda09189eaa969a75f96c86a96ccee962443924 SHA512 6a27d8eab3076930df46b0cf127f9b664f8d4147349b2b98132f464deb7f69d87e0167e8ee8e6c64249125ad73760d965ecbc81c252b63a1e7aac95594c62b74
DIST Python-3.8.7.tar.xz.asc 833 BLAKE2B a629251732d1ea6054564b6b1a9a2b3b716e20c8fad1b6b69a9c64aff7fe7fca7dc6cdeef52d9889873f1e349c1cb1c4fba4483d8ded6ab2cdd279ea4abaeb70 SHA512 ddbad087a1d116e743e11f50d29ee0563241e4397312fa76691bad30ef62908d281ba77b89dbd8f348faa50f1c953399d79ad6c2ab77828e690f3a5a3b708bc8
+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.8.8rc1.tar.xz 18268528 BLAKE2B 113d3e2f6f9ea0c7046a694b7f3a48c1afb5cfb57cc862e8662fd4509e75ea36204d9172cf79c1c5c59a95ee78f41fc67a697bee58b7b17fa5051d75ad663b01 SHA512 cb4f00d94b5a311fc883b9e7c58df600432ca7259d387b31089817800fd4574f1f86f4cabef3376e6fac14ef3a64906ec08355f31b01628e117041a7c9cda50d
DIST Python-3.8.8rc1.tar.xz.asc 833 BLAKE2B 0d73e0eec4706322880feff321c162b3dc1b9065db2844852af1cf35824a55e4da8525611bcf03609c8388cfe2ab9a42fcf011ad39226c272c0f19eae1cd1030 SHA512 3de1ea7090e66fbf111db05cf667a7e12dfe8a22d1797a97eda47e837d98dac750735eb419677b742437ec5a6d1c386d8a3406c8519b744e9aacc52e46c32dd3
DIST Python-3.9.1.tar.xz 18897104 BLAKE2B bcbce176510e8e7c6ba6070588bedc52121c21c5271f59b3d629dfb542c51ee62622b2ca53a6e2041f1a51b2d089368cc4de9bb749e8ebad9a2c4eb4de83538e SHA512 b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019
@@ -30,6 +32,7 @@ DIST python-gentoo-patches-3.7.9-r2.tar.xz 17068 BLAKE2B 2cb838e6ab2f76b5d08df42
DIST python-gentoo-patches-3.7.9_p3.tar.xz 22000 BLAKE2B ca23030243727349f3c055854ad8ecf144dc567dd3ef5bf7d0b8cec8e2c97ba123d9b7af3c46e18c108e44fa9fea287c6cbb2e5438d84d5efa18023f82567610 SHA512 4d9f00352dd9f0d7aaf04bacb4a286dcefda25054bf7bef22ec5e5b4655bc0eac0a6b119291cb969d835167d5b81a831480ca12af734b11d44eb607c194ac616
DIST python-gentoo-patches-3.8.7-r1.tar.xz 12572 BLAKE2B 7658ae56993674a7f57cb2b6d9f23e9d01fa75f00edcc67dc3474bba0361373555c44d47c155cf9ffcbd8551ff2ae56bc22a25bef1bf6b3efed7314b2824d777 SHA512 76d0e4d18fbeedc28430a3dd1656cfafdfefdae28978baddd3e0102d0fce83be173b58da74203fc6a90cf50c63fa612f0b78e65bc59a41dce4739eead398d352
DIST python-gentoo-patches-3.8.7_p2.tar.xz 17708 BLAKE2B 495a24e0496be246d2beddfaaa8886049197ca5973dadccfcd26b3b2237e4b06b85f0e4d418db411d055ca3d0c1173e03dd5a62e29f64c133e8da6261b17c99b SHA512 c06f2fc1fe48be010e8230ac3d474b9c8386bba8f762dbe35d128ad63eaa1a4c2a5a991ec6044564331d0dec4f248a71e37959ebe666b0693d6ed41f460a67f7
+DIST python-gentoo-patches-3.8.8.tar.xz 10948 BLAKE2B 745f4a8d3a41c61a8bc96b550c230d0a33ea0e1ecff2aec46dd91c9573cbd3a880891bea446cb867412687ad5875e14da36df065a5bcf340c984b8e2a165f183 SHA512 31c9acec582a13703e95e4ea9fbedc764638c470b02d798e46de0dfddbdf65e0a07ce14ae95af78cf46c29bdfcec0f65bbde06518a742061e1805ae4699610eb
DIST python-gentoo-patches-3.8.8rc1.tar.xz 10952 BLAKE2B 5f5bb92f9db7bc6f7a3d67505df3ec19f430ea823314e35c47f7b1e0d9dee573af043cc0ade28d4622a55a200ce79ff2816ac435c0b116df3615b1da09b16e49 SHA512 2c1904f66e06932084068406f699df38c8889f695f77c0addd3a55d85679bbf618b7ae4d75e1102356e15a9f3c3246a49b0416931e43dac08f8c54365bbc1ee0
DIST python-gentoo-patches-3.9.1-r1.tar.xz 10464 BLAKE2B d69ce207020b7a34eb45c149ce88001167704763fbc373a8d5aff48a1d6337774dfb6c75d477442516b8dceb87b116e6d8cf3231334ced9b03aa970aa0d2e8e1 SHA512 72b1e37b1ceac9a0e95aa63a7dd404c69f60ae7a8aac472b8c17100c873a4d28d3291231643862c9d1cfaf990040f8e780590274314047adee199c159d745369
DIST python-gentoo-patches-3.9.1_p2.tar.xz 15556 BLAKE2B 5e265ef8edee70694d73c6df6eb908a747be34e1e89b900d2470d41e7e043d179408bc643a52ade6e54e61a210ee8850d02a2cb452a9336f3973345c1d027158 SHA512 eabfd304b39975258705f5e9b238f709196ce0cbd3803f157dc77d864631a3eea380084a3a4de180e3ba7e92239608ae369e810f8066c0f1ff9fa251bbc1816c
diff --git a/dev-lang/python/python-3.8.8.ebuild b/dev-lang/python/python-3.8.8.ebuild
new file mode 100644
index 000000000000..c4ef86dff67a
--- /dev/null
+++ b/dev-lang/python/python-3.8.8.ebuild
@@ -0,0 +1,338 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+WANT_LIBTOOL="none"
+
+inherit autotools 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}"
+
+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
+ 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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +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-libs/libffi:=
+ 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? (
+ !libressl? ( dev-libs/openssl:= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ 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/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+PDEPEND="app-eselect/eselect-python"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
+
+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}"
+ )
+
+ 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
+
+ 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
+
+ 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
+ ac_cv_header_stropts_h=no
+
+ --enable-shared
+ $(use_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
+ )
+
+ OPT="" 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
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # 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"
+
+ 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
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ 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
+
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || 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 "${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
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_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
+}