summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-05-04 13:36:27 +0200
committerMichał Górny <mgorny@gentoo.org>2021-05-04 14:41:17 +0200
commitc50103da557b769eeeffc3ca54f56fe0ebaa307f (patch)
treef9a3ba979364f604ac06cedcaf2d506015108cb6 /dev-lang/python
parentdev-python/boto3: Bump to 1.17.64 (diff)
downloadgentoo-c50103da557b769eeeffc3ca54f56fe0ebaa307f.tar.gz
gentoo-c50103da557b769eeeffc3ca54f56fe0ebaa307f.tar.bz2
gentoo-c50103da557b769eeeffc3ca54f56fe0ebaa307f.zip
dev-lang/python: Bump to 3.10.0b1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest3
-rw-r--r--dev-lang/python/python-3.10.0_beta1.ebuild347
2 files changed, 350 insertions, 0 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 742e8522bcf3..0e08a61342e9 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.0a7.tar.xz 18403212 BLAKE2B f3795f82b186ef8895000498083ecc5f6f2478b22ef55ff31b25f1609ddbd3059489276695d0c156ec4d691659ffc1c4b37ffab01e3a4811f238045b66ff1f60 SHA512 050ac4a0671bd61aed581afb03f0e5cc496b6e6b3a0a2e712da20a7104dbf440f4b8d7231298691df18ef9ecc2de4741c3169bbd5bf831eb53547a270d27815b
DIST Python-3.10.0a7.tar.xz.asc 833 BLAKE2B 8ca46ac985bce713fc4def4afe32396c61362b3e07e41b626c3766e00bf78e28c12f49a310b261f74fcadffc632e86640b915cc5d8401631921a54df033e1fa3 SHA512 a5ba57390a57fc2ae6daf9794117972f908aba127f51b8988976959f0ad8374e3d9a5f15cde91892210782aa550bbecfe71b6908310316d4fdcdb86771d5a238
+DIST Python-3.10.0b1.tar.xz 18545252 BLAKE2B e078e3a29d874949d49447b5c176873091b7eb82e1b46cabdc13ba815e97f0f0d5a75bd25af0b3e874503c155e29583c78262ffa446f25f0db098be345f5cbfa SHA512 b8366f1fd92690bf78dc8ce07724d1b79a8c7f246e9a13ba3043687c5553b52d4d7baf48bf96f9fe088de73baef1df2131e2704ffed9a7549890723a7898c4c5
+DIST Python-3.10.0b1.tar.xz.asc 833 BLAKE2B 70f15521ac3e117709b4ff7583563893612c5ee72c05071e056010ee3b654b9e7e97c4044d377e439328947ffdedc2e4689f00466d97092bc95851b72941239c SHA512 7e22dd9ddf37d0c2116cfb9f08050f0909ccc04f1a63e67b96f0cec743845c492659a661af518fd76d513fa36d08da11fe3a1166ede31de583369b4c3389de57
DIST Python-3.6.13.tar.xz 17213520 BLAKE2B 7c1938f92616d428d107a70397a9f7fc82377d0e3d26c2da4f5bcb79a54115f71498a5e7b5f601b6cff6f362ec1f689c3ac920eb248956e1e4f6c21602514dd1 SHA512 0482b3e7eea22b0635b61f06753e77c832c9431385c5ea1ecb8f60868262afd2b45c239badb8e906a33f035ffbf347b4a499fe6f0f008f1fa9ecc9de66c63947
DIST Python-3.6.13.tar.xz.asc 833 BLAKE2B bc1df46c2e460c2d237647ecff84e12c75f6ed24a432d2f9cbefdead8a77d4468e5e4ed9f4debac593c63cf95d27c9f7d0f94dce69af8746cc71f0d0b1810245 SHA512 f6e8936a5e5b45d3ad41184717f5ed75debe29f81138fd1b75b53bc7d2905edff42b42dd7995b11ba6d80233c5c3755521edb19d7ac28d414bfebb2d1dfc0c86
DIST Python-3.7.10.tar.xz 17392580 BLAKE2B b030db731d141b97f1be794a19382cc252c5bbf867661d09c9455640ebcfd3030e8a691f57fe91a2e0c4e5d3bd4f8f3de07fa4bd287a58900d8c6e1fba2f0583 SHA512 5cb61739acbd29f526d25073443398b2ca0eef30d01d134e8236c8bbc7ab0586c44ec00689f5a75e6aedc0170acf4551721ada5e967e4b99a146cfcaad949128
@@ -17,6 +19,7 @@ DIST Python-3.9.4.tar.xz.asc 833 BLAKE2B aa261d09200f150522ae9fb15e75f3a927ed48d
DIST python-gentoo-patches-2.7.18_p8.tar.xz 28304 BLAKE2B 76b653f45a284b7354202f646a645b1c245791a04b09cbae89b404f6bb14b56a54855433a03e96081b72c88841c125131c97f4e2714e3951472db6ec59279328 SHA512 7fed01c44cd5ed36e142a19cb10f3b5f0f8fd50e78ece32e353395e2bcee4fa0fe7f8b13d736f7b1eb5e1f2662ee4749c089fa0dda6f5d19bb08a01c7b3db200
DIST python-gentoo-patches-2.7.18_p9.tar.xz 30188 BLAKE2B 4f9f80e0a967a980d247b50ac3c38419e70fd2dafada4e4b5593935915b17f09aec1a88b0baac58cbc0c2fcf73eee6dbd5fa5f378a8e3e1923a0028c2c3a1f5a SHA512 874e88142570fd62437b043a2763b32667dfd9856a7cc8884f5d3c09e7a8520e1cdeb5eb5b6bbb884fbc3bfad03abb83e1c260969f4b9520ce99334cfaeb76fb
DIST python-gentoo-patches-3.10.0a7.tar.xz 8164 BLAKE2B 7df2fea05c52279cca7f91acc72d9d9ef5f3774387f218ab70494465e76de91c6780da1d15c1097268c89c6e39e80071ab9a613aac2680cdb260aa69797a4786 SHA512 6686aec44d71813d8c044ea5715be34325753b2b79c6e2ad74badd91fd9e66040f2fec68bd886a43c409c6aafc14a7bb000db1712d7fe8fb6e4d25ae6795ce9e
+DIST python-gentoo-patches-3.10.0b1.tar.xz 8116 BLAKE2B aba4856d2463e57187680780cf5b5ae24547413acb8c2439c03ac9a33d4908b547cc40e3d9752c6a76494d47d2b824677e28b543a2fcf8cc1913395d05327f1c SHA512 b62b3fb00a76e3eac842e45d10b3d1cafbcad20659db54e11011d9dfca70c34e28bf187fa7fcdbc4e0bdcf66efbb7f8a6eb2a8d1b28f6e8c1e639e63c203f215
DIST python-gentoo-patches-3.6.13_p1.tar.xz 14972 BLAKE2B 0c479bc6bac5e2c53236d8cd0c5282dfff86004f9e2a51ff027da38fac840bd02fb6bc9ddffd49f154afa96139287a3236acc6160fa7d4c233288fc0dcdb499b SHA512 90a3e1da8a6952ca68c104042097d7ed68eb4f9b0605c9db17560b791b454b829c0b13b99c259cadf86cf639f3599538df7d7e1af725f0debf30039505019905
DIST python-gentoo-patches-3.6.13_p3.tar.xz 17640 BLAKE2B 255e96f61ad8adb7fdf1cc9f11ca99c8368601dfe9bab4c96adf1e77472dfdf365a6ce197ecc72b574849e2a6235063d63558711049e9e7407862871dc0f2f20 SHA512 7b9a39cd65129c495c513e1b8c259a88194b8877b891cedaa5289bedcc44dbcb5e63e3b9922ef085321e7f4db73b5a5090d30725b456491a98d7ef40b85601eb
DIST python-gentoo-patches-3.7.10_p1.tar.xz 14140 BLAKE2B 2d9a80f27e7ba5be2d5cdb5c1cd95eb6e32de7a0bc86c58a4ff9e8727d2ad588ceec064d2222dffe783d1710bef91d35ba02128508944a5f9266f4d4332217d7 SHA512 6705311d03212d61c7e6e97d83e4110ca1ec621a24a7d0ad16812fabcb87dfce9ef8c1184b16f7f0f5998576bfa87840e105b754edebd6e21c0ad33786255a0c
diff --git a/dev-lang/python/python-3.10.0_beta1.ebuild b/dev-lang/python/python-3.10.0_beta1.ebuild
new file mode 100644
index 000000000000..e20ed1b73034
--- /dev/null
+++ b/dev-lang/python/python-3.10.0_beta1.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/_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/"
+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 +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? ( dev-libs/openssl:= )
+ tk? (
+ >=dev-lang/tcl-8.0:=
+ >=dev-lang/tk-8.0:=
+ dev-tcltk/blt:=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:= )
+ !!<sys-apps/sandbox-2.21"
+# 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=
+ # workaround https://bugs.gentoo.org/775416
+ addwrite /usr/lib/python3.10/site-packages
+
+ 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
+}