summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-03-01 23:21:12 +0100
committerMichał Górny <mgorny@gentoo.org>2021-03-01 23:58:05 +0100
commit1f9f5b5b354cac65161e223d6eef9a82e36a1aee (patch)
tree568077d4965baf3d3231545e93f6f9141566cb6d /dev-lang
parentsys-cluster/nomad: remove vulnerable versions (diff)
downloadgentoo-1f9f5b5b354cac65161e223d6eef9a82e36a1aee.tar.gz
gentoo-1f9f5b5b354cac65161e223d6eef9a82e36a1aee.tar.bz2
gentoo-1f9f5b5b354cac65161e223d6eef9a82e36a1aee.zip
dev-lang/python: Bump to 3.10.0a6
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.10.0_alpha6.ebuild347
2 files changed, 350 insertions, 0 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index f753f9009e94..15af1a2d4a7d 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -2,6 +2,8 @@ DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
DIST Python-3.10.0a5.tar.xz 18286124 BLAKE2B 618a812c601cdf910dc5064ec8e6350f3473c368be92663de0a543aef8dab5d767db72e0c796e465dafb86e3ee6acf21f4d2d6d99128a3bb615b8ba6759c9b6f SHA512 d686f9044ea964af2b5556068c0d804511d3148b455643d06a8b566f265a5fa9a9a3713ff0c3fee2c0da9bba33b913983ea4fcb22d679cfdcb83c6de32aa575e
DIST Python-3.10.0a5.tar.xz.asc 833 BLAKE2B f92a03f8ce6d3396f053ab508aca55c937b5ae91462e2325842b4c00fc105a817df10fb4086273939a50f91fcd5d1003da2807d1b8ab0794e6ecd660d72515bf SHA512 4f1fe9b42830c89cb35ea1634fd7484f3bbf7ff22868c71fadc0601c3b02ff2ea386cfbc7ea167a2770d732aa01532fb7d4abb198a07e4710565e3eec138408c
+DIST Python-3.10.0a6.tar.xz 18354336 BLAKE2B 30e39f6657546f19792e037a4dc2877c0cca722f894088736ca373c79f23d0697ef35a631a3d96a26b625fadc32dddb187bfdcf105d874efef8325704bcbb29c SHA512 b405e4d0294306ceab205ba98b6f34a0384993a2eff93b75974bb9bfc25599ab594ef98c633de9db77de11cef11f03e4c9b5090f985cc00e8b9dec39003997a6
+DIST Python-3.10.0a6.tar.xz.asc 833 BLAKE2B 415dad66ac08c086e7da1657d99864b930e07fb521a9dc7cd2b0b72d97882f71e662a42be5cec6b44cfc0d1308163f0f54e7660dc91d6a81dfa12fd0df150c83 SHA512 4f6e86afd09622a461d712b32fb48ba76c37dbc807d84cd375be4afed53b43ca4e0027a816383323d8ccd334845a2e5337ba15a83097a0e0df9270f439b1964e
DIST Python-3.6.12.tar.xz 17202980 BLAKE2B c8d22e4d57bcaffe77cd902cda3a473e73adf2b74ab104c23b4d846f19632a24cc0c478af84079b16d784bd1c0956824c06c1f6134fd24f54e58aaab0fe96bb6 SHA512 1462801f3f6626a853097d34ccdca9838c4c5bd81ecc3abc751003f5f2f8d36eecdaa4130ef4218de351c5586093c11669639a34492668fbc5a2a4a241f4a070
DIST Python-3.6.12.tar.xz.asc 833 BLAKE2B a5eb9f907732bb5afd8f56115ab830ed6b6f4545e4063cfe316fb7aa1ba8694fcb8c936919b4045d9f5923446f8ea20978ead059078ed50ad48a82a3bb5ae941 SHA512 91d9ce0c471359f6aa3d5d5dcad7316ec6ed173f895a51e72b1853dc422fda57a00411c88fdc40a8e21888d964136b0b032e15b215c3b6c62ffc82bddc580860
DIST Python-3.6.13.tar.xz 17213520 BLAKE2B 7c1938f92616d428d107a70397a9f7fc82377d0e3d26c2da4f5bcb79a54115f71498a5e7b5f601b6cff6f362ec1f689c3ac920eb248956e1e4f6c21602514dd1 SHA512 0482b3e7eea22b0635b61f06753e77c832c9431385c5ea1ecb8f60868262afd2b45c239badb8e906a33f035ffbf347b4a499fe6f0f008f1fa9ecc9de66c63947
@@ -22,6 +24,7 @@ DIST python-gentoo-patches-2.7.18-r6.tar.xz 22740 BLAKE2B 1727fcab273dfe5e5739c7
DIST python-gentoo-patches-2.7.18_p7.tar.xz 26392 BLAKE2B 94a6312698789810af835a2ac8d87c34dc8d435a1ff4d5c9b7ae9175b92da6a4b204feabf9bb6db498fc6dcc17bb1b042b2b0b17ddc781587589b1ab0905396d SHA512 a3cd34f38a717183d9a8d6b91817a6ac989fb8ae4275f35cba4be810813a4c9c45f4e72d16aee33904eddaee77c4719b516392d629d2c4627c840e4ecc6bc121
DIST python-gentoo-patches-3.10.0a5.tar.xz 8972 BLAKE2B b407e501037f2732ec0844ab033fcd6226ff96731f5e752b5a807c69aa57e678e9f170aab5dd3f69bd9d2951c82ecca4664354c11aca88a4a742281ab5d28887 SHA512 4dceba9adc33b06196f326dbeacb8b17eaeffebee98f0025d4faef8f047be9c20a153a8eb89a2b64f9248cbd8810ae4a5ebfc2534770a940825a5d8a4a02e068
DIST python-gentoo-patches-3.10.0a5_p1.tar.xz 14336 BLAKE2B 953d77e59460bbd53bf41bc57e48957f6a6d08dc9f8a1adb4ad3c64a0a1281a15142952e6733c1dd9a5eadd6d81332db54dc4eb906e73ccfd35e0d18a8363962 SHA512 2c0f01c39e530a612e1ce64298d3f019f7313258b2dc75964b6ebdfcd98139d46fc5f673ee2e509602a2f825de23e3a6d96c234745098e1da83b6779dbbeb1fb
+DIST python-gentoo-patches-3.10.0a6.tar.xz 8148 BLAKE2B 0fb7fc2eb2d17ff34f9b973aee7761d78b279425044f80a8f3f6a97ae479492f509bf4a18bce16e9b5efd44e6a755a9af3cac1a63e8fa7169e4880ad08bc0f7a SHA512 39d449ef090ac01463e507784500fde408487350d5a5cf86b9bda852f451841874557d674c69eb31e94121d2d243f862ea97cd0d8ba69f4ddfdefa461336594b
DIST python-gentoo-patches-3.6.12-r2.tar.xz 17988 BLAKE2B c252bce5ac49b9af11174d3c974d95c24ec280230cede75a7650cb914f8acb3d41b8d575e469fe7f274c6d3bc238847b82e815bf1444c5afd7292e00248e3365 SHA512 50813fbd810c8b865c0f0f8d56780af7a9e094336ba486ddd94ba8fb0a83b5373f41274bbb10c3d732449ee5b2076b7430404c02bfac10fb9b27f92de79c25e2
DIST python-gentoo-patches-3.6.12_p3.tar.xz 22416 BLAKE2B deddb2b4b23f7caa2b40a0916f5426f28f616b8fc6834c237623fb4e633dfbe1f946ff7e54989664a662184e01721f15f21a1d379db633d7f245b23fac3d7e47 SHA512 49ffeba37003dc1afe27811d880469a991583efb73c28871717e51711533927996293c576082e35fff17db98e7ba6e512e84289c4b7ed5a6880b011a9741a59b
DIST python-gentoo-patches-3.6.13.tar.xz 11428 BLAKE2B 3f6ea5a5a79ba6b0d12d9d36c62232cbf0accbc3a8d792a12e2ed8ad5ce5079ac5a5d12493fbc36dff66b275a18a538c439fff02efdd77a68d5c974aa0e62a96 SHA512 118a8ca9d19b515d03ec834a950410bd8c8086dd9b3ea2e1dff5c7d3d42a4d873bccea62aa9d1b64f92892aecd090eb1337dec7d200668d55fece68eeacfa2dc
diff --git a/dev-lang/python/python-3.10.0_alpha6.ebuild b/dev-lang/python/python-3.10.0_alpha6.ebuild
new file mode 100644
index 000000000000..d059b8bfc600
--- /dev/null
+++ b/dev-lang/python/python-3.10.0_alpha6.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2021 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/_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/"
+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(+)] )"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ sys-devel/autoconf-archive
+ 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
+
+# large file tests involve a 2.5G file being copied (duplicated)
+CHECKREQS_DISK_BUILD=5500M
+
+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}"
+ )
+
+ 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
+ --without-static-libpython
+ $(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
+
+ 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
+
+ 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
+}