summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-portage/gpyutils/files/implementations.txt1
-rw-r--r--dev-lang/python-exec/python-exec-2.4.8.ebuild2
-rw-r--r--dev-lang/python/Manifest4
-rw-r--r--dev-lang/python/python-2.7.18_p14.ebuild346
-rw-r--r--dev-lang/python/python-3.11.0_alpha7.ebuild405
-rw-r--r--dev-lang/python/python-3.11.0_beta1-r1.ebuild (renamed from dev-lang/python/python-3.11.0_beta1.ebuild)3
-rw-r--r--dev-python/appdirs/appdirs-1.4.4-r2.ebuild2
-rw-r--r--dev-python/attrs/attrs-21.4.0-r1.ebuild23
-rw-r--r--dev-python/certifi/certifi-3021.3.16-r2.ebuild2
-rw-r--r--dev-python/execnet/execnet-1.9.0-r1.ebuild2
-rw-r--r--dev-python/filelock/filelock-3.6.0.ebuild13
-rw-r--r--dev-python/flit_core/flit_core-3.7.1.ebuild2
-rw-r--r--dev-python/gpep517/gpep517-5.ebuild2
-rw-r--r--dev-python/hypothesis/hypothesis-6.46.2.ebuild8
-rw-r--r--dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild2
-rw-r--r--dev-python/installer/installer-0.5.1.ebuild2
-rw-r--r--dev-python/jaraco-classes/jaraco-classes-3.2.1-r1.ebuild2
-rw-r--r--dev-python/jaraco-context/jaraco-context-4.1.1-r2.ebuild2
-rw-r--r--dev-python/jaraco-functools/jaraco-functools-3.5.0-r2.ebuild2
-rw-r--r--dev-python/jaraco-text/jaraco-text-3.7.0-r2.ebuild2
-rw-r--r--dev-python/mock/mock-4.0.3-r1.ebuild2
-rw-r--r--dev-python/more-itertools/more-itertools-8.13.0.ebuild2
-rw-r--r--dev-python/nspektr/nspektr-0.3.0.ebuild2
-rw-r--r--dev-python/ordered-set/ordered-set-4.1.0.ebuild3
-rw-r--r--dev-python/packaging/packaging-21.3-r2.ebuild3
-rw-r--r--dev-python/pexpect/files/pexpect-4.8.0-py311.patch67
-rw-r--r--dev-python/pexpect/pexpect-4.8.0-r3.ebuild3
-rw-r--r--dev-python/pluggy/pluggy-1.0.0-r2.ebuild2
-rw-r--r--dev-python/pretend/pretend-1.0.9-r2.ebuild2
-rw-r--r--dev-python/psutil/psutil-5.9.0.ebuild2
-rw-r--r--dev-python/ptyprocess/ptyprocess-0.7.0-r1.ebuild2
-rw-r--r--dev-python/py/py-1.11.0-r1.ebuild9
-rw-r--r--dev-python/pyparsing/pyparsing-3.0.8.ebuild2
-rw-r--r--dev-python/pytest-forked/pytest-forked-1.4.0-r1.ebuild2
-rw-r--r--dev-python/pytest-timeout/pytest-timeout-2.1.0.ebuild7
-rw-r--r--dev-python/pytest-xdist/pytest-xdist-2.5.0-r1.ebuild2
-rw-r--r--dev-python/pytest/pytest-7.1.2.ebuild25
-rw-r--r--dev-python/setuptools/setuptools-62.1.0.ebuild2
-rw-r--r--dev-python/setuptools_scm/setuptools_scm-6.4.2.ebuild2
-rw-r--r--dev-python/six/six-1.16.0-r1.ebuild2
-rw-r--r--dev-python/sortedcontainers/sortedcontainers-2.4.0-r1.ebuild2
-rw-r--r--dev-python/testpath/testpath-0.6.0.ebuild2
-rw-r--r--dev-python/tomli/tomli-2.0.1.ebuild11
-rw-r--r--dev-python/unittest-or-fail/unittest-or-fail-2.ebuild2
-rw-r--r--dev-python/wheel/wheel-0.37.1-r1.ebuild14
-rw-r--r--dev-python/zope-event/zope-event-4.5.0-r3.ebuild2
-rw-r--r--dev-python/zope-interface/zope-interface-5.4.0-r2.ebuild2
-rw-r--r--dev-python/zope-testing/zope-testing-4.10-r2.ebuild2
-rw-r--r--eclass/distutils-r1.eclass130
-rw-r--r--eclass/python-utils-r1.eclass13
-rwxr-xr-xeclass/tests/python-utils-r1.sh133
-rw-r--r--profiles/base/package.use.force1
-rw-r--r--profiles/base/use.stable.mask7
-rw-r--r--profiles/desc/python_single_target.desc1
-rw-r--r--profiles/desc/python_targets.desc1
55 files changed, 391 insertions, 902 deletions
diff --git a/app-portage/gpyutils/files/implementations.txt b/app-portage/gpyutils/files/implementations.txt
index f8f378e84459..f55ca773827c 100644
--- a/app-portage/gpyutils/files/implementations.txt
+++ b/app-portage/gpyutils/files/implementations.txt
@@ -20,6 +20,7 @@ python3_7 dead 3.7
python3_8 old 3.8
python3_9 current 3.9
python3_10 supported 3.10
+python3_11 supported 3.11
pypy1_8 2.7-pypy-1.8 dead p1.8
pypy1_9 2.7-pypy-1.9 dead p1.9
diff --git a/dev-lang/python-exec/python-exec-2.4.8.ebuild b/dev-lang/python-exec/python-exec-2.4.8.ebuild
index 7cab7a668f31..4fd31fa50604 100644
--- a/dev-lang/python-exec/python-exec-2.4.8.ebuild
+++ b/dev-lang/python-exec/python-exec-2.4.8.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit python-any-r1
DESCRIPTION="Python script wrapper"
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 91207518b603..7ec3962075aa 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -2,8 +2,6 @@ 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.4.tar.xz 19342692 BLAKE2B c430ad9bed71729fda29433af0614b6c0110a85e23f4cb5cff3a9b501febe99b20094367a5428f256fb3aeef97f34d439ef677fc8ae4d596d52da7976b65ebb5 SHA512 6c9aeecddc55c7896b2e8527fca131c7b2b6127d56ce1a001ccedfebf590334e0c0bb7c517ed3cf1da3c1910e002552b56aa7e03eeb672f42ff0bd8150799113
DIST Python-3.10.4.tar.xz.asc 833 BLAKE2B 289f2e96bfc2b60c4ae94b1591779d604f203890c4f5db2ee16e305bf03c6ddb9c8d6da4471a06b5943e12888f37ca572ea30876e9a80382a26814f66b41b7bf SHA512 699e37bf09067083af159e3734b38c952bdc75432c8abfb7a7b8cce7ca975038da37490abeb5c13befd2dacb84a5341ad30de5d0a63d35af5c512215744f4d6d
-DIST Python-3.11.0a7.tar.xz 19362368 BLAKE2B e11ba447731b5e7a15f9c11e44ebf2555e67cdebd9c52b0d232fdcbf1c061a4ed9e528bf493d68a868b438c65b54b30f426da41009408df286bc1583ab0124cd SHA512 f193ff9dedece16a428db129f4aac9ee2ad5f73a7f7eda2063ed58bfe230a4bfef067fe6c03e2b26d01be1d3205cee8778489ea6543b74a9d2a1f415739a63ba
-DIST Python-3.11.0a7.tar.xz.asc 833 BLAKE2B 33788f8855fd65fd27473a503c2e711fde6bbd52d0c812cdccd495daed2b3d3b1f93590d1b9aa87840326caf264a796875b626c06bd58060f070fe7c802dd10f SHA512 eae66913e3a5efe70a0c3639537e5b19cd66175a61f6e8b46b194411e27df2ea3f6a8154ed05c5905f511815f011e80c5b06b3a836ea8749cb9825f85223ecc2
DIST Python-3.11.0b1.tar.xz 19416160 BLAKE2B b0eeb2d9ee9d54def7bf555d9d0dc9f343e98b48b77ce4d9a9ec5b7c45a4bfb11e70159cca8a4e384f8d21678f210dcaca5016f68ac59859a1bf336148498dc0 SHA512 f59f2905315593b2f486827ed7a1ffcce9e0faaac671c16026373c3e40d1e1c7b3e1f3384c2fbcbff8acc72c2466cd11c20fd04fbb6e839510d85966b38ebbf1
DIST Python-3.11.0b1.tar.xz.asc 833 BLAKE2B d2e9fe9271d916133e3e9e13cef72af193cd3fd870143702f200ab77f14e85d1fdae2a59d12a62a361cc38f2a70d03aa0225f57f4c56c6ecdec9e687f9db245b SHA512 e47f2ad1ebc98681f82de74250b5d890e13d1c3c3573da24a4e646f9cdd41e035b9405646e0aee331df120d977f544a215df370b7a4b203082cf489776eca5ff
DIST Python-3.7.13.tar.xz 18027980 BLAKE2B e5ea14e3b080e7a126a4faeaad9287a7b5cb6be138a0423b4dbfd1c3b07e452ed99aeb818380ab02e9967673b0855a4a81cec1fa5b9b919f8a4e45da70e9df3a SHA512 e95366b68c1bc1dc1cfb2d956f1f49c5d0f620b4780d03002b3c321d2788108eb4e51d224cfa6bcecf7d780e9024ab0ef88b422d6d25e983dbc56b2a89b7dce9
@@ -14,10 +12,8 @@ DIST Python-3.9.11.tar.xz 19724780 BLAKE2B 25b017e36b22235790633eb1a88f520922252
DIST Python-3.9.11.tar.xz.asc 833 BLAKE2B c60c291f3dad39c842d16717239006f3ee703eaa586d95ea02ba4486d20a1e82065bbaf7af6f7cf6a04799229359791a72834096b6ce5f5d2b583ba5962d441b SHA512 a84bbfa68ec1c0e45bbd64af4481be7d68885021287731c69346a3cb25c9bf607be84dd72af2d3a6fbeabbde64975f37c4bb4f61274e72b92b4277fa48543e52
DIST Python-3.9.12.tar.xz 19740524 BLAKE2B 05f2469aa53ca36221ef4976b17bfde3e5b86afd5a8114e5a7fd899f975a8e55022555ef718d5352ab68de1b7b23865a0bf713768c9c2b30d591438c9a396d25 SHA512 081981901e14149748fd35228db0b3b1d96fef227ae7404f07b8bad0fda4b02649bf31c348c94aefdaf3327565d78f9489437c2c02f647b15d41376a27a23e97
DIST Python-3.9.12.tar.xz.asc 833 BLAKE2B 33436d0404a643215a8fd2b967ffd216201da24f374941bf65b888159ccfabcbe79b751eca2dd489b06605604338c8bbaab74aa10abbe4bcffaa54236301228e SHA512 dddaa27f8a29034f458edb6739398a5455c87fe37b6349e161865a9deedca118ffe9cb82663cc75bbe60b3b556399c0c6855f5262aac1fe90d36a3694fca65b2
-DIST python-gentoo-patches-2.7.18_p14.tar.xz 34292 BLAKE2B 654cefb34e3ff61b2a212b83ec1344ebace160aa3971a4a61212b637b83083864e1bdad2b78b166ba0b2302d145f3051b71b3e6b581b064f7f09353acdb4e4b1 SHA512 d6551a045ade16ef523a29451cc07499c29aca92548e46c21bcd6b3a3549f5a0f1f7e420ac326e7ac2e0158fb5490429a9d28994cbfd6c8b5b652788612bac26
DIST python-gentoo-patches-2.7.18_p15.tar.xz 34956 BLAKE2B d173f276dd9c0ce31004dcc55a0d18e9ce25a47683c2df3c4dd62e967dfbbb35be59a2f08cf20f30a19475a8a2344dd95b17400eafa88b5fdbe9270a12ccbf32 SHA512 d9386808265f978808e5c0ffd384cefe54fb0e05aeccfd394167d5227d9cd66e25c8e93c54914762b2cfc3c2dd851b26a7a84d62634c6aa8a0798aacbb7ac25f
DIST python-gentoo-patches-3.10.4.tar.xz 8592 BLAKE2B 67fba3e1fedb17430e5cd93da995b4acaf714db512031b5a2f775a25f793f007941561663cfa413d645ccddc2e22d65d250a40fa166cafda8805488d877ff57d SHA512 3ed2b8ff8f1eb8febe7dcd4b5d13d6d54468be1d525f8f1118977d3bbc78f690a597b09383939d023b03380a306e4bff1693382e29ff562312d803305b1709b2
-DIST python-gentoo-patches-3.11.0a7.tar.xz 3332 BLAKE2B 3c658cd486d96fe103146cfa77deaaf828919ad1d8cb4b73bc48e7c9f856c58634aa99fffe16fcd4bc071f70651313ee0e46f60cef8b129c2f096c0db7873303 SHA512 1787f75997e34544f4756a647a69ba3d188574430a1a317bef25cf8e7aaab8a78f0d6c94fd9c603f45262bf55eb6c9d9557e167e53aef7ac6f9ed88a93d39434
DIST python-gentoo-patches-3.11.0b1.tar.xz 3324 BLAKE2B aa54baab51376b63d7ec4783f9dd9d18581a07c935aaf3619d009d32e754b3a54cbcc2b4f9b0dd556bb91f74198a27ebee4e31baaac04907ba0f1fa87ad04121 SHA512 d609d95fe2e89550f70bb0cb3e4b468e571d00fa3e8a60020193a048c089685b7452146d8bb51e5e39203f08b0b53c661c156ba7711bdd7b107ceebd4ceec440
DIST python-gentoo-patches-3.7.13.tar.xz 18344 BLAKE2B 038db3d4e08f7af41811af0073b9c970171a26ffdf8ca116646f285101cc2299372f264e89183f136b3a56c4f756f39518ef6083c3c13baf409034706212fd22 SHA512 7f0d95e0a558aa4171589b887121e09c74679fc99089274e38c35188cd77e7fd6c53231d052455d752fab0c7dcef86a0efc4b8875a9e2a6c295907c271c6e822
DIST python-gentoo-patches-3.8.13.tar.xz 16004 BLAKE2B 5c0c6c9263570a467391e60c324d1dbc1e50ffda9cad1e204df124441b593146f18e5f1529eb7d385b35c5f4b9e597807971b6b66f7f8eef156ad87c9ad32743 SHA512 4ceb831e2d62bd73909b53a3b553b2cd73d08bcf2a1c92b47eaeb1221d40daabcaed14977265bcb265df00b6bf363dbebbd61a62dca4bf6ef40c6b911e980597
diff --git a/dev-lang/python/python-2.7.18_p14.ebuild b/dev-lang/python/python-2.7.18_p14.ebuild
deleted file mode 100644
index da93a624d8f9..000000000000
--- a/dev-lang/python/python-2.7.18_p14.ebuild
+++ /dev/null
@@ -1,346 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic pax-utils \
- python-utils-r1 toolchain-funcs verify-sig
-
-MY_P="Python-${PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${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="berkdb bluetooth build examples gdbm hardened +ncurses +readline +sqlite +ssl tk wininst +xml"
-
-# 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:=
- dev-libs/libffi:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- berkdb? ( || (
- sys-libs/db:5.3
- sys-libs/db:4.8
- ) )
- 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:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
- bluetooth? ( net-wireless/bluez )"
-BDEPEND="
- virtual/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+="
- !build? ( app-misc/mime-types )
- !<=dev-lang/python-exec-2.4.6-r1"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-pkg_setup() {
- if use berkdb; then
- ewarn "'bsddb' module is out-of-date and no longer maintained inside"
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
- ewarn "is provided by dev-python/bsddb3."
- else
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
- ewarn "You might need to migrate your databases."
- fi
- fi
-}
-
-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" \
- Lib/distutils/command/install.py \
- Lib/distutils/sysconfig.py \
- Lib/site.py \
- Lib/sysconfig.py \
- Lib/test/test_site.py \
- Makefile.pre.in \
- Modules/Setup.dist \
- Modules/getpath.c \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- eautoreconf
-}
-
-src_configure() {
- # dbm module can be linked against berkdb or gdbm.
- # Defaults to gdbm when both are enabled, #204343.
- local disable
- use berkdb || use gdbm || disable+=" dbm"
- use berkdb || disable+=" _bsddb"
- # 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
-
- if tc-is-cross-compiler; then
- # Force some tests that try to poke fs paths.
- export ac_cv_file__dev_ptc=no
- export ac_cv_file__dev_ptmx=yes
- fi
-
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
- tc-export CXX
- # The configure script fails to use pkg-config correctly.
- # http://bugs.python.org/issue15506
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
- if use berkdb; then
- dbmliborder+="${dbmliborder:+:}bdb"
- fi
-
- local myeconfargs=(
- # The check is broken on clang, and gives false positive:
- # https://bugs.gentoo.org/596798
- # (upstream dropped this flag in 3.2a4 anyway)
- ac_cv_opt_olimit_ok=no
- # 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
-
- --with-fpectl
- --enable-shared
- --enable-ipv6
- --with-threads
- --enable-unicode=ucs4
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --with-system-expat
- --with-system-ffi
- --without-ensurepip
- )
-
- 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
-
- # Avoid invoking pgen for cross-compiles.
- touch Include/graminit.h Python/graminit.c
-
- emake
-
- # 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="distutils gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # bug 660358
- local -x COLUMNS=80
-
- # Daylight saving time problem
- # https://bugs.python.org/issue22067
- # https://bugs.gentoo.org/610628
- local -x TZ=UTC
-
- # Rerun failed tests in verbose mode (regrtest -w).
- emake test EXTRATESTOPTS="-w" < /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/$(get_libdir)/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/$(get_libdir)/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die
-
- # Fix collisions between different slots of Python.
- mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die
- mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die
- mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die
- rm "${ED}/usr/bin/smtpd.py" || die
-
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die
-
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- 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 scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python
- ln -s "../../../bin/python${PYVER}" \
- "${scriptdir}/python" || die
- # python-config
- ln -s "../../../bin/python${PYVER}-config" \
- "${scriptdir}/python-config" || die
- # 2to3, pydoc, pyvenv
- 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
-
- # python2* is no longer wrapped, so just symlink it
- local pymajor=${PYVER%.*}
- dosym "python${PYVER}" "/usr/bin/python${pymajor}"
- dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config"
-}
diff --git a/dev-lang/python/python-3.11.0_alpha7.ebuild b/dev-lang/python/python-3.11.0_alpha7.ebuild
deleted file mode 100644
index e0a70414581f..000000000000
--- a/dev-lang/python/python-3.11.0_alpha7.ebuild
+++ /dev/null
@@ -1,405 +0,0 @@
-# Copyright 1999-2022 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 libedit lto +ncurses pgo +readline +sqlite +ssl test tk wininst"
-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/expat-2.1:=
- 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? (
- !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
- )
- !!<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/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-[[ ${PV} != *_alpha* ]] &&
- RDEPEND+=" dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-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
-
- # 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
-
- 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
-
- if use pgo; then
- local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
- export PROFILE_TASK="-m test -j${jobs} --pgo-extended -x test_gdb -u-network"
-
- # All of these seem to occasionally hang for PGO inconsistently
- # They'll even hang here but be fine in src_test sometimes.
- # bug #828535 (and related: bug #788022)
- PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
-
- if has_version "app-arch/rpm" ; then
- # Avoid sandbox failure (attempts to write to /var/lib/rpm)
- PROFILE_TASK+=" -x test_distutils"
- fi
- 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
- --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
- --with-platlibdir=lib
-
- $(use_with lto)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- )
-
- # disable implicit optimization/debugging flags
- local -x OPT=
- # 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=
-
- 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}=disabled"
- done >> Makefile || die
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
- # Prevent using distutils bundled by setuptools.
- # https://bugs.gentoo.org/823728
- export SETUPTOOLS_USE_DISTUTILS=stdlib
- 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/python3.11/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
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- if use sparc ; then
- # bug #788022
- skipped_tests+=" multiprocessing_fork"
- skipped_tests+=" multiprocessing_forkserver"
- fi
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # Expects to find skipped tests and fails
- mv "${S}"/Lib/test/test_tools/test_freeze.py "${T}" || die
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite /usr/lib/python3.11/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
-
- mv "${T}"/test_freeze.py "${S}"/Lib/test/test_tools/test_freeze.py || die
-
- 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
-
- # 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 || 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
-}
diff --git a/dev-lang/python/python-3.11.0_beta1.ebuild b/dev-lang/python/python-3.11.0_beta1-r1.ebuild
index 856edae9f10c..b26c9312a617 100644
--- a/dev-lang/python/python-3.11.0_beta1.ebuild
+++ b/dev-lang/python/python-3.11.0_beta1-r1.ebuild
@@ -79,8 +79,7 @@ BDEPEND="
RDEPEND+="
!build? ( app-misc/mime-types )
"
-# TODO: enable this after adding eclass support
-if [[ ${PV} != *_alpha* ]] && false; then
+if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
diff --git a/dev-python/appdirs/appdirs-1.4.4-r2.ebuild b/dev-python/appdirs/appdirs-1.4.4-r2.ebuild
index 3f4aa961ed79..94cd682f2d29 100644
--- a/dev-python/appdirs/appdirs-1.4.4-r2.ebuild
+++ b/dev-python/appdirs/appdirs-1.4.4-r2.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/attrs/attrs-21.4.0-r1.ebuild b/dev-python/attrs/attrs-21.4.0-r1.ebuild
index 1cca38cc572e..ee58a8f99423 100644
--- a/dev-python/attrs/attrs-21.4.0-r1.ebuild
+++ b/dev-python/attrs/attrs-21.4.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
@@ -28,10 +28,29 @@ BDEPEND="
$(python_gen_impl_dep sqlite)
$(python_gen_cond_dep '
dev-python/cloudpickle[${PYTHON_USEDEP}]
- ' 'python*')
+ ' python3_{8..10})
>=dev-python/hypothesis-3.6.0[${PYTHON_USEDEP}]
>=dev-python/pytest-4.3.0[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=()
+ [[ ${EPYTHON} == python3.11 ]] && EPYTEST_DESELECT+=(
+ # https://github.com/python-attrs/attrs/issues/907
+ tests/test_annotations.py::TestAnnotations::test_auto_attribs
+ tests/test_annotations.py::TestAnnotations::test_annotations_strings
+ 'tests/test_init_subclass.py::test_init_subclass_vanilla[True]'
+ tests/test_make.py::TestAutoDetect::test_detects_setstate_getstate
+ tests/test_slots.py::TestClosureCellRewriting::test_closure_cell_rewriting
+ tests/test_slots.py::TestClosureCellRewriting::test_inheritance
+ 'tests/test_slots.py::TestClosureCellRewriting::test_cls_static[True]'
+ tests/test_slots.py::TestPickle::test_no_getstate_setstate_for_dict_classes
+ tests/test_slots.py::TestPickle::test_no_getstate_setstate_if_option_false
+ tests/test_slots.py::test_slots_super_property_get_shurtcut
+ )
+
+ epytest
+}
diff --git a/dev-python/certifi/certifi-3021.3.16-r2.ebuild b/dev-python/certifi/certifi-3021.3.16-r2.ebuild
index a26991a8a727..a64adff0fb94 100644
--- a/dev-python/certifi/certifi-3021.3.16-r2.ebuild
+++ b/dev-python/certifi/certifi-3021.3.16-r2.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/execnet/execnet-1.9.0-r1.ebuild b/dev-python/execnet/execnet-1.9.0-r1.ebuild
index 9132437f00a1..6d15b0446edc 100644
--- a/dev-python/execnet/execnet-1.9.0-r1.ebuild
+++ b/dev-python/execnet/execnet-1.9.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/filelock/filelock-3.6.0.ebuild b/dev-python/filelock/filelock-3.6.0.ebuild
index 24b7a3982d3f..618da9440f4e 100644
--- a/dev-python/filelock/filelock-3.6.0.ebuild
+++ b/dev-python/filelock/filelock-3.6.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
@@ -12,10 +12,12 @@ MY_P=py-filelock-${PV}
DESCRIPTION="A platform independent file lock for Python"
HOMEPAGE="
https://github.com/tox-dev/py-filelock/
- https://pypi.org/project/filelock/"
+ https://pypi.org/project/filelock/
+"
SRC_URI="
https://github.com/tox-dev/py-filelock/archive/${PV}.tar.gz
- -> ${MY_P}.tar.gz"
+ -> ${MY_P}.tar.gz
+"
S="${WORKDIR}/${MY_P}"
LICENSE="Unlicense"
@@ -23,7 +25,10 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
BDEPEND="
- test? ( dev-python/pytest-timeout[${PYTHON_USEDEP}] )"
+ test? (
+ dev-python/pytest-timeout[${PYTHON_USEDEP}]
+ )
+"
distutils_enable_tests pytest
diff --git a/dev-python/flit_core/flit_core-3.7.1.ebuild b/dev-python/flit_core/flit_core-3.7.1.ebuild
index 2da9764263f4..a10b8415499b 100644
--- a/dev-python/flit_core/flit_core-3.7.1.ebuild
+++ b/dev-python/flit_core/flit_core-3.7.1.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/gpep517/gpep517-5.ebuild b/dev-python/gpep517/gpep517-5.ebuild
index 823987f2f511..1c06fab5af2e 100644
--- a/dev-python/gpep517/gpep517-5.ebuild
+++ b/dev-python/gpep517/gpep517-5.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=manual
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
diff --git a/dev-python/hypothesis/hypothesis-6.46.2.ebuild b/dev-python/hypothesis/hypothesis-6.46.2.ebuild
index 758bc099894a..d8d3c343338c 100644
--- a/dev-python/hypothesis/hypothesis-6.46.2.ebuild
+++ b/dev-python/hypothesis/hypothesis-6.46.2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_REQ_USE="threads(+),sqlite"
inherit distutils-r1 multiprocessing optfeature
@@ -39,6 +39,12 @@ BDEPEND="
distutils_enable_tests pytest
+src_prepare() {
+ # unblock py3.11 betas
+ sed -i -e '/release.*alpha/d' tests/conftest.py || die
+ distutils-r1_src_prepare
+}
+
python_test() {
# subtests are broken by warnings from random plugins
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
diff --git a/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild b/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild
index 3f899d4324b2..6ff39b0ad7e5 100644
--- a/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild
+++ b/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/installer/installer-0.5.1.ebuild b/dev-python/installer/installer-0.5.1.ebuild
index 71731fa000a9..ce5ec797e91d 100644
--- a/dev-python/installer/installer-0.5.1.ebuild
+++ b/dev-python/installer/installer-0.5.1.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=manual
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
DESCRIPTION="A library for installing Python wheels"
diff --git a/dev-python/jaraco-classes/jaraco-classes-3.2.1-r1.ebuild b/dev-python/jaraco-classes/jaraco-classes-3.2.1-r1.ebuild
index 925a87a8003f..b2df39d160e7 100644
--- a/dev-python/jaraco-classes/jaraco-classes-3.2.1-r1.ebuild
+++ b/dev-python/jaraco-classes/jaraco-classes-3.2.1-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
diff --git a/dev-python/jaraco-context/jaraco-context-4.1.1-r2.ebuild b/dev-python/jaraco-context/jaraco-context-4.1.1-r2.ebuild
index d54aa2dd845c..90f35d3b5b14 100644
--- a/dev-python/jaraco-context/jaraco-context-4.1.1-r2.ebuild
+++ b/dev-python/jaraco-context/jaraco-context-4.1.1-r2.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/jaraco-functools/jaraco-functools-3.5.0-r2.ebuild b/dev-python/jaraco-functools/jaraco-functools-3.5.0-r2.ebuild
index 5c918cbdd9eb..4819bf48342f 100644
--- a/dev-python/jaraco-functools/jaraco-functools-3.5.0-r2.ebuild
+++ b/dev-python/jaraco-functools/jaraco-functools-3.5.0-r2.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
diff --git a/dev-python/jaraco-text/jaraco-text-3.7.0-r2.ebuild b/dev-python/jaraco-text/jaraco-text-3.7.0-r2.ebuild
index 3b04ab47615b..f6c5910ebc08 100644
--- a/dev-python/jaraco-text/jaraco-text-3.7.0-r2.ebuild
+++ b/dev-python/jaraco-text/jaraco-text-3.7.0-r2.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/mock/mock-4.0.3-r1.ebuild b/dev-python/mock/mock-4.0.3-r1.ebuild
index 0c86f77012b6..98086486bfc5 100644
--- a/dev-python/mock/mock-4.0.3-r1.ebuild
+++ b/dev-python/mock/mock-4.0.3-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/more-itertools/more-itertools-8.13.0.ebuild b/dev-python/more-itertools/more-itertools-8.13.0.ebuild
index cc4e9425f839..1857cb45c541 100644
--- a/dev-python/more-itertools/more-itertools-8.13.0.ebuild
+++ b/dev-python/more-itertools/more-itertools-8.13.0.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/nspektr/nspektr-0.3.0.ebuild b/dev-python/nspektr/nspektr-0.3.0.ebuild
index c60b62bda5e4..77fd27d8a3c2 100644
--- a/dev-python/nspektr/nspektr-0.3.0.ebuild
+++ b/dev-python/nspektr/nspektr-0.3.0.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
diff --git a/dev-python/ordered-set/ordered-set-4.1.0.ebuild b/dev-python/ordered-set/ordered-set-4.1.0.ebuild
index 0b2f50ec0989..8952c7507163 100644
--- a/dev-python/ordered-set/ordered-set-4.1.0.ebuild
+++ b/dev-python/ordered-set/ordered-set-4.1.0.ebuild
@@ -5,7 +5,8 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
inherit distutils-r1
DESCRIPTION="A mutable set that remembers the order of its entries"
diff --git a/dev-python/packaging/packaging-21.3-r2.ebuild b/dev-python/packaging/packaging-21.3-r2.ebuild
index 3eaada9efec2..bfffb773d8e3 100644
--- a/dev-python/packaging/packaging-21.3-r2.ebuild
+++ b/dev-python/packaging/packaging-21.3-r2.ebuild
@@ -5,7 +5,8 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
inherit distutils-r1
DESCRIPTION="Core utilities for Python packages"
diff --git a/dev-python/pexpect/files/pexpect-4.8.0-py311.patch b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
new file mode 100644
index 000000000000..b7de17a68785
--- /dev/null
+++ b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
@@ -0,0 +1,67 @@
+From 52af5b0ae0627139524448a3f2e83d9f40802bc2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Thu, 24 Mar 2022 15:15:33 +0100
+Subject: [PATCH] Convert @asyncio.coroutine to async def
+
+This is required for Python 3.11+ support.
+
+Fixes https://github.com/pexpect/pexpect/issues/677
+---
+ pexpect/_async.py | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/pexpect/_async.py b/pexpect/_async.py
+index dfbfeef5..bc83261d 100644
+--- a/pexpect/_async.py
++++ b/pexpect/_async.py
+@@ -4,8 +4,7 @@
+
+ from pexpect import EOF
+
+-@asyncio.coroutine
+-def expect_async(expecter, timeout=None):
++async def expect_async(expecter, timeout=None):
+ # First process data that was previously read - if it maches, we don't need
+ # async stuff.
+ idx = expecter.existing_data()
+@@ -14,7 +13,7 @@ def expect_async(expecter, timeout=None):
+ if not expecter.spawn.async_pw_transport:
+ pw = PatternWaiter()
+ pw.set_expecter(expecter)
+- transport, pw = yield from asyncio.get_event_loop()\
++ transport, pw = await asyncio.get_event_loop()\
+ .connect_read_pipe(lambda: pw, expecter.spawn)
+ expecter.spawn.async_pw_transport = pw, transport
+ else:
+@@ -22,26 +21,25 @@ def expect_async(expecter, timeout=None):
+ pw.set_expecter(expecter)
+ transport.resume_reading()
+ try:
+- return (yield from asyncio.wait_for(pw.fut, timeout))
++ return (await asyncio.wait_for(pw.fut, timeout))
+ except asyncio.TimeoutError as e:
+ transport.pause_reading()
+ return expecter.timeout(e)
+
+-@asyncio.coroutine
+-def repl_run_command_async(repl, cmdlines, timeout=-1):
++async def repl_run_command_async(repl, cmdlines, timeout=-1):
+ res = []
+ repl.child.sendline(cmdlines[0])
+ for line in cmdlines[1:]:
+- yield from repl._expect_prompt(timeout=timeout, async_=True)
++ await repl._expect_prompt(timeout=timeout, async_=True)
+ res.append(repl.child.before)
+ repl.child.sendline(line)
+
+ # Command was fully submitted, now wait for the next prompt
+- prompt_idx = yield from repl._expect_prompt(timeout=timeout, async_=True)
++ prompt_idx = await repl._expect_prompt(timeout=timeout, async_=True)
+ if prompt_idx == 1:
+ # We got the continuation prompt - command was incomplete
+ repl.child.kill(signal.SIGINT)
+- yield from repl._expect_prompt(timeout=1, async_=True)
++ await repl._expect_prompt(timeout=1, async_=True)
+ raise ValueError("Continuation prompt found - input was incomplete:")
+ return u''.join(res + [repl.child.before])
+
diff --git a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
index 22046e4dcd82..67a37a70dcc5 100644
--- a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
+++ b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
@@ -29,6 +29,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-sphinx-3.patch
"${FILESDIR}"/${P}-fix-PS1.patch
+ "${FILESDIR}"/${P}-py311.patch
)
distutils_enable_tests pytest
diff --git a/dev-python/pluggy/pluggy-1.0.0-r2.ebuild b/dev-python/pluggy/pluggy-1.0.0-r2.ebuild
index 8655fc6560ad..4ae4ade2545a 100644
--- a/dev-python/pluggy/pluggy-1.0.0-r2.ebuild
+++ b/dev-python/pluggy/pluggy-1.0.0-r2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/pretend/pretend-1.0.9-r2.ebuild b/dev-python/pretend/pretend-1.0.9-r2.ebuild
index 6b0c06303593..ab44f3afaa3d 100644
--- a/dev-python/pretend/pretend-1.0.9-r2.ebuild
+++ b/dev-python/pretend/pretend-1.0.9-r2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/psutil/psutil-5.9.0.ebuild b/dev-python/psutil/psutil-5.9.0.ebuild
index baf0ec1ad2e9..72698498c1df 100644
--- a/dev-python/psutil/psutil-5.9.0.ebuild
+++ b/dev-python/psutil/psutil-5.9.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/ptyprocess/ptyprocess-0.7.0-r1.ebuild b/dev-python/ptyprocess/ptyprocess-0.7.0-r1.ebuild
index e00a1f8c590c..f0a1eeba2068 100644
--- a/dev-python/ptyprocess/ptyprocess-0.7.0-r1.ebuild
+++ b/dev-python/ptyprocess/ptyprocess-0.7.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/py/py-1.11.0-r1.ebuild b/dev-python/py/py-1.11.0-r1.ebuild
index 0bafd545fb77..204af38c1ce0 100644
--- a/dev-python/py/py-1.11.0-r1.ebuild
+++ b/dev-python/py/py-1.11.0-r1.ebuild
@@ -4,11 +4,16 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
inherit distutils-r1
DESCRIPTION="library with cross-python path, ini-parsing, io, code, log facilities"
-HOMEPAGE="https://py.readthedocs.io/ https://pypi.org/project/py/"
+HOMEPAGE="
+ https://py.readthedocs.io/
+ https://github.com/pytest-dev/py/
+ https://pypi.org/project/py/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
diff --git a/dev-python/pyparsing/pyparsing-3.0.8.ebuild b/dev-python/pyparsing/pyparsing-3.0.8.ebuild
index ab92af56d02a..5dd04e79a482 100644
--- a/dev-python/pyparsing/pyparsing-3.0.8.ebuild
+++ b/dev-python/pyparsing/pyparsing-3.0.8.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/pytest-forked/pytest-forked-1.4.0-r1.ebuild b/dev-python/pytest-forked/pytest-forked-1.4.0-r1.ebuild
index ea35730f0141..ad4a61224380 100644
--- a/dev-python/pytest-forked/pytest-forked-1.4.0-r1.ebuild
+++ b/dev-python/pytest-forked/pytest-forked-1.4.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/pytest-timeout/pytest-timeout-2.1.0.ebuild b/dev-python/pytest-timeout/pytest-timeout-2.1.0.ebuild
index 133c5efa0b91..854117081a47 100644
--- a/dev-python/pytest-timeout/pytest-timeout-2.1.0.ebuild
+++ b/dev-python/pytest-timeout/pytest-timeout-2.1.0.ebuild
@@ -4,7 +4,8 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
inherit distutils-r1
DESCRIPTION="pytest plugin to abort hanging tests"
@@ -21,7 +22,9 @@ BDEPEND="
test? (
dev-python/pexpect[${PYTHON_USEDEP}]
!hppa? (
- dev-python/pytest-cov[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/pytest-cov[${PYTHON_USEDEP}]
+ ' python3_{8..10} pypy3)
)
)"
diff --git a/dev-python/pytest-xdist/pytest-xdist-2.5.0-r1.ebuild b/dev-python/pytest-xdist/pytest-xdist-2.5.0-r1.ebuild
index 68f728f1bae7..1079a190886e 100644
--- a/dev-python/pytest-xdist/pytest-xdist-2.5.0-r1.ebuild
+++ b/dev-python/pytest-xdist/pytest-xdist-2.5.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/pytest/pytest-7.1.2.ebuild b/dev-python/pytest/pytest-7.1.2.ebuild
index edb8937ece04..1143038d9a5b 100644
--- a/dev-python/pytest/pytest-7.1.2.ebuild
+++ b/dev-python/pytest/pytest-7.1.2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1 multiprocessing
@@ -35,14 +35,16 @@ BDEPEND="
>=dev-python/setuptools_scm-6.2.3[${PYTHON_USEDEP}]
test? (
${RDEPEND}
- dev-python/argcomplete[${PYTHON_USEDEP}]
- >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
- dev-python/nose[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/xmlschema[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/argcomplete[${PYTHON_USEDEP}]
+ >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/xmlschema[${PYTHON_USEDEP}]
+ ' python3_{8..10} pypy3)
)
"
@@ -54,6 +56,11 @@ src_test() {
}
python_test() {
+ if ! has "${EPYTHON}" python3.{8..10} pypy3; then
+ einfo "Skipping tests on ${EPYTHON}"
+ return
+ fi
+
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local -x COLUMNS=80
diff --git a/dev-python/setuptools/setuptools-62.1.0.ebuild b/dev-python/setuptools/setuptools-62.1.0.ebuild
index 13523e6b5b8e..933bd7378c51 100644
--- a/dev-python/setuptools/setuptools-62.1.0.ebuild
+++ b/dev-python/setuptools/setuptools-62.1.0.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_REQ_USE="xml(+)"
inherit distutils-r1 multiprocessing
diff --git a/dev-python/setuptools_scm/setuptools_scm-6.4.2.ebuild b/dev-python/setuptools_scm/setuptools_scm-6.4.2.ebuild
index d0e711ec1e6a..eedb7ab930d5 100644
--- a/dev-python/setuptools_scm/setuptools_scm-6.4.2.ebuild
+++ b/dev-python/setuptools_scm/setuptools_scm-6.4.2.ebuild
@@ -5,7 +5,7 @@
EAPI=7
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/six/six-1.16.0-r1.ebuild b/dev-python/six/six-1.16.0-r1.ebuild
index e3858b0a1272..5a7dc9923d19 100644
--- a/dev-python/six/six-1.16.0-r1.ebuild
+++ b/dev-python/six/six-1.16.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/sortedcontainers/sortedcontainers-2.4.0-r1.ebuild b/dev-python/sortedcontainers/sortedcontainers-2.4.0-r1.ebuild
index 981debeee8b3..ff38e7b61e06 100644
--- a/dev-python/sortedcontainers/sortedcontainers-2.4.0-r1.ebuild
+++ b/dev-python/sortedcontainers/sortedcontainers-2.4.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/testpath/testpath-0.6.0.ebuild b/dev-python/testpath/testpath-0.6.0.ebuild
index c10460480dd5..ec0d110d4721 100644
--- a/dev-python/testpath/testpath-0.6.0.ebuild
+++ b/dev-python/testpath/testpath-0.6.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
diff --git a/dev-python/tomli/tomli-2.0.1.ebuild b/dev-python/tomli/tomli-2.0.1.ebuild
index a3ce67d66ee5..ca6baab56cc2 100644
--- a/dev-python/tomli/tomli-2.0.1.ebuild
+++ b/dev-python/tomli/tomli-2.0.1.ebuild
@@ -5,19 +5,21 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=manual
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
DESCRIPTION="A lil' TOML parser"
HOMEPAGE="
https://pypi.org/project/tomli/
- https://github.com/hukkin/tomli/"
+ https://github.com/hukkin/tomli/
+"
SRC_URI="
https://github.com/hukkin/tomli/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
https://files.pythonhosted.org/packages/py3/${PN::1}/${PN}/${P}-py3-none-any.whl
- -> ${P}-py3-none-any.whl.zip"
+ -> ${P}-py3-none-any.whl.zip
+"
S=${WORKDIR}
LICENSE="MIT"
@@ -25,7 +27,8 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-macos ~x64-macos ~x64-solaris"
BDEPEND="
- app-arch/unzip"
+ app-arch/unzip
+"
distutils_enable_tests unittest
diff --git a/dev-python/unittest-or-fail/unittest-or-fail-2.ebuild b/dev-python/unittest-or-fail/unittest-or-fail-2.ebuild
index d67ea3ddb6e8..406103e1dc02 100644
--- a/dev-python/unittest-or-fail/unittest-or-fail-2.ebuild
+++ b/dev-python/unittest-or-fail/unittest-or-fail-2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/wheel/wheel-0.37.1-r1.ebuild b/dev-python/wheel/wheel-0.37.1-r1.ebuild
index 6f72f7970f36..8b1ef52db3b6 100644
--- a/dev-python/wheel/wheel-0.37.1-r1.ebuild
+++ b/dev-python/wheel/wheel-0.37.1-r1.ebuild
@@ -5,11 +5,15 @@
EAPI=7
DISTUTILS_USE_PEP517=flit
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
inherit distutils-r1
DESCRIPTION="A built-package format for Python"
-HOMEPAGE="https://pypi.org/project/wheel/"
+HOMEPAGE="
+ https://github.com/pypa/wheel/
+ https://pypi.org/project/wheel/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SRC_URI="https://github.com/pypa/wheel/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
@@ -18,11 +22,13 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
RDEPEND="
- dev-python/packaging[${PYTHON_USEDEP}]"
+ dev-python/packaging[${PYTHON_USEDEP}]
+"
BDEPEND="
test? (
dev-python/setuptools[${PYTHON_USEDEP}]
- )"
+ )
+"
distutils_enable_tests pytest
diff --git a/dev-python/zope-event/zope-event-4.5.0-r3.ebuild b/dev-python/zope-event/zope-event-4.5.0-r3.ebuild
index a431122ed2fa..6914ccfe31c2 100644
--- a/dev-python/zope-event/zope-event-4.5.0-r3.ebuild
+++ b/dev-python/zope-event/zope-event-4.5.0-r3.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/zope-interface/zope-interface-5.4.0-r2.ebuild b/dev-python/zope-interface/zope-interface-5.4.0-r2.ebuild
index 3aaa3940673a..dfdde228d4a4 100644
--- a/dev-python/zope-interface/zope-interface-5.4.0-r2.ebuild
+++ b/dev-python/zope-interface/zope-interface-5.4.0-r2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/dev-python/zope-testing/zope-testing-4.10-r2.ebuild b/dev-python/zope-testing/zope-testing-4.10-r2.ebuild
index c8c9a4fcf7d6..330ec37e2324 100644
--- a/dev-python/zope-testing/zope-testing-4.10-r2.ebuild
+++ b/dev-python/zope-testing/zope-testing-4.10-r2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1573d803f3f6..17286070e712 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -851,6 +851,97 @@ _distutils-r1_check_all_phase_mismatch() {
fi
}
+# @FUNCTION: _distutils-r1_print_package_versions
+# @INTERNAL
+# @DESCRIPTION:
+# Print the version of the relevant build system packages to aid
+# debugging.
+_distutils-r1_print_package_versions() {
+ local packages=()
+
+ if [[ ${DISTUTILS_USE_PEP517} ]]; then
+ packages+=(
+ dev-python/gpep517
+ dev-python/installer
+ )
+ case ${DISTUTILS_USE_PEP517} in
+ flit)
+ packages+=(
+ dev-python/flit_core
+ )
+ ;;
+ flit_scm)
+ packages+=(
+ dev-python/flit_core
+ dev-python/flit_scm
+ dev-python/setuptools_scm
+ )
+ ;;
+ hatchling)
+ packages+=(
+ dev-python/hatchling
+ )
+ ;;
+ jupyter)
+ packages+=(
+ dev-python/jupyter_packaging
+ dev-python/setuptools
+ dev-python/setuptools_scm
+ dev-python/wheel
+ )
+ ;;
+ maturin)
+ packages+=(
+ dev-util/maturin
+ )
+ ;;
+ pbr)
+ packages+=(
+ dev-python/pbr
+ dev-python/setuptools
+ dev-python/wheel
+ )
+ ;;
+ pdm)
+ packages+=(
+ dev-python/pdm-pep517
+ dev-python/setuptools
+ )
+ ;;
+ poetry)
+ packages+=(
+ dev-python/poetry-core
+ )
+ ;;
+ setuptools)
+ packages+=(
+ dev-python/setuptools
+ dev-python/setuptools_scm
+ dev-python/wheel
+ )
+ ;;
+ esac
+ else
+ case ${DISTUTILS_USE_SETUPTOOLS} in
+ manual|no)
+ return
+ ;;
+ *)
+ packages+=(
+ dev-python/setuptools
+ )
+ ;;
+ esac
+ fi
+
+ local pkg
+ einfo "Build system packages:"
+ for pkg in "${packages[@]}"; do
+ local installed=$(best_version "${pkg}")
+ einfo " $(printf '%-30s' "${pkg}"): ${installed#${pkg}-}"
+ done
+}
+
# @FUNCTION: distutils-r1_python_prepare_all
# @DESCRIPTION:
# The default python_prepare_all(). It applies the patches from PATCHES
@@ -894,6 +985,10 @@ distutils-r1_python_prepare_all() {
python_copy_sources
fi
+ python_export_utf8_locale
+ [[ ${EAPI} == 6 ]] && xdg_environment_reset # Bug 577704
+ _distutils-r1_print_package_versions
+
_DISTUTILS_DEFAULT_CALLED=1
}
@@ -1091,12 +1186,38 @@ distutils_pep517_install() {
local -x WHEEL_BUILD_DIR=${BUILD_DIR}/wheel
mkdir -p "${WHEEL_BUILD_DIR}" || die
+ if [[ -n ${mydistutilsargs[@]} ]]; then
+ die "mydistutilsargs are banned in PEP517 mode (use DISTUTILS_ARGS)"
+ fi
+
+ local config_settings=
+ if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
+ case ${DISTUTILS_USE_PEP517} in
+ setuptools)
+ config_settings=$(
+ "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die
+ import json
+ import sys
+ print(json.dumps({"--global-option": sys.argv[1:]}))
+ EOF
+ )
+ ;;
+ *)
+ die "DISTUTILS_ARGS are not supported by ${DISTUTILS_USE_PEP517}"
+ ;;
+ esac
+ fi
+
local build_backend=$(_distutils-r1_get_backend)
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
+ local config_args=()
+ [[ -n ${config_settings} ]] &&
+ config_args+=( --config-json "${config_settings}" )
local wheel=$(
gpep517 build-wheel --backend "${build_backend}" \
--output-fd 3 \
- --wheel-dir "${WHEEL_BUILD_DIR}" 3>&1 >&2 ||
+ --wheel-dir "${WHEEL_BUILD_DIR}" \
+ "${config_args[@]}" 3>&1 >&2 ||
die "Wheel build failed"
)
[[ -n ${wheel} ]] || die "No wheel name returned"
@@ -1181,10 +1302,6 @@ distutils-r1_python_compile() {
esac
if [[ ${DISTUTILS_USE_PEP517} ]]; then
- if [[ -n ${DISTUTILS_ARGS[@]} || -n ${mydistutilsargs[@]} ]]; then
- die "DISTUTILS_ARGS are not supported in PEP-517 mode"
- fi
-
# python likes to compile any module it sees, which triggers sandbox
# failures if some packages haven't compiled their modules yet.
addpredict "${EPREFIX}/usr/lib/${EPYTHON}"
@@ -1601,9 +1718,6 @@ distutils-r1_src_configure() {
debug-print-function ${FUNCNAME} "${@}"
local ret=0
- python_export_utf8_locale
- [[ ${EAPI} == 6 ]] && xdg_environment_reset # Bug 577704
-
if declare -f python_configure >/dev/null; then
_distutils-r1_run_foreach_impl python_configure || ret=${?}
fi
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 7b1bd012a37e..0d958828e163 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -43,7 +43,7 @@ inherit multiprocessing toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3
- python3_{8..10}
+ python3_{8..11}
)
readonly _PYTHON_ALL_IMPLS
@@ -83,7 +83,7 @@ _python_verify_patterns() {
local impl pattern
for pattern; do
case ${pattern} in
- -[23]|3.[89]|3.10)
+ -[23]|3.[89]|3.1[01])
continue
;;
esac
@@ -132,7 +132,7 @@ _python_set_impls() {
# please keep them in sync with _PYTHON_ALL_IMPLS
# and _PYTHON_HISTORICAL_IMPLS
case ${i} in
- pypy3|python2_7|python3_[89]|python3_10)
+ pypy3|python2_7|python3_[89]|python3_1[01])
;;
jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-6]|python3_[1-7])
obsolete+=( "${i}" )
@@ -245,7 +245,7 @@ _python_impl_matches() {
[[ ${impl} == python${pattern/./_} || ${impl} == pypy3 ]] &&
return 0
;;
- 3.8|3.10)
+ 3.8|3.1[01])
[[ ${impl} == python${pattern/./_} ]] && return 0
;;
*)
@@ -461,6 +461,8 @@ _python_export() {
PYTHON_PKG_DEP=">=dev-lang/python-3.9.9-r1:3.9";;
python3.10)
PYTHON_PKG_DEP=">=dev-lang/python-3.10.0_p1-r1:3.10";;
+ python3.11)
+ PYTHON_PKG_DEP=">=dev-lang/python-3.11.0_beta1-r1:3.11";;
python*)
PYTHON_PKG_DEP="dev-lang/python:${impl#python}";;
pypy)
@@ -1286,6 +1288,9 @@ epytest() {
-Wdefault
# override color output
"--color=${color}"
+ # count is more precise when we're dealing with a large number
+ # of tests
+ -o console_output_style=count
# disable the undesirable-dependency plugins by default to
# trigger missing argument strips. strip options that require
# them from config files. enable them explicitly via "-p ..."
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 9c41798c4727..6abf10cadabd 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -64,6 +64,8 @@ tmpfile=$(mktemp)
inherit python-utils-r1
+ebegin "Testing python2.7"
+eindent
test_var EPYTHON python2_7 python2.7
test_var PYTHON python2_7 /usr/bin/python2.7
if [[ -x /usr/bin/python2.7 ]]; then
@@ -76,77 +78,64 @@ if [[ -x /usr/bin/python2.7 ]]; then
fi
test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
+eoutdent
-test_var EPYTHON python3_6 python3.6
-test_var PYTHON python3_6 /usr/bin/python3.6
-if [[ -x /usr/bin/python3.6 ]]; then
- abiflags=$(/usr/bin/python3.6 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
- test_var PYTHON_SITEDIR python3_6 "/usr/lib*/python3.6/site-packages"
- test_var PYTHON_INCLUDEDIR python3_6 "/usr/include/python3.6${abiflags}"
- test_var PYTHON_LIBPATH python3_6 "/usr/lib*/libpython3.6${abiflags}$(get_libname)"
- test_var PYTHON_CONFIG python3_6 "/usr/bin/python3.6${abiflags}-config"
- test_var PYTHON_CFLAGS python3_6 "*-I/usr/include/python3.6*"
- test_var PYTHON_LIBS python3_6 "*-lpython3.6*"
-fi
-test_var PYTHON_PKG_DEP python3_6 '*dev-lang/python*:3.6'
-test_var PYTHON_SCRIPTDIR python3_6 /usr/lib/python-exec/python3.6
-
-test_var EPYTHON python3_7 python3.7
-test_var PYTHON python3_7 /usr/bin/python3.7
-if [[ -x /usr/bin/python3.7 ]]; then
- abiflags=$(/usr/bin/python3.7 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
- test_var PYTHON_SITEDIR python3_7 "/usr/lib/python3.7/site-packages"
- test_var PYTHON_INCLUDEDIR python3_7 "/usr/include/python3.7${abiflags}"
- test_var PYTHON_LIBPATH python3_7 "/usr/lib*/libpython3.7${abiflags}$(get_libname)"
- test_var PYTHON_CONFIG python3_7 "/usr/bin/python3.7${abiflags}-config"
- test_var PYTHON_CFLAGS python3_7 "*-I/usr/include/python3.7*"
- test_var PYTHON_LIBS python3_7 "*-lpython3.7*"
-fi
-test_var PYTHON_PKG_DEP python3_7 '*dev-lang/python*:3.7'
-test_var PYTHON_SCRIPTDIR python3_7 /usr/lib/python-exec/python3.7
-
-test_var EPYTHON python3_8 python3.8
-test_var PYTHON python3_8 /usr/bin/python3.8
-if [[ -x /usr/bin/python3.8 ]]; then
- abiflags=$(/usr/bin/python3.8 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
- test_var PYTHON_SITEDIR python3_8 "/usr/lib/python3.8/site-packages"
- test_var PYTHON_INCLUDEDIR python3_8 "/usr/include/python3.8${abiflags}"
- test_var PYTHON_LIBPATH python3_8 "/usr/lib*/libpython3.8${abiflags}$(get_libname)"
- test_var PYTHON_CONFIG python3_8 "/usr/bin/python3.8${abiflags}-config"
- test_var PYTHON_CFLAGS python3_8 "*-I/usr/include/python3.8*"
- test_var PYTHON_LIBS python3_8 "*-lpython3.8*"
-fi
-test_var PYTHON_PKG_DEP python3_8 '*dev-lang/python*:3.8'
-test_var PYTHON_SCRIPTDIR python3_8 /usr/lib/python-exec/python3.8
-
-test_var EPYTHON python3_9 python3.9
-test_var PYTHON python3_9 /usr/bin/python3.9
-if [[ -x /usr/bin/python3.9 ]]; then
- abiflags=$(/usr/bin/python3.9 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
- test_var PYTHON_SITEDIR python3_9 "/usr/lib/python3.9/site-packages"
- test_var PYTHON_INCLUDEDIR python3_9 "/usr/include/python3.9${abiflags}"
- test_var PYTHON_LIBPATH python3_9 "/usr/lib*/libpython3.9${abiflags}$(get_libname)"
- test_var PYTHON_CONFIG python3_9 "/usr/bin/python3.9${abiflags}-config"
- test_var PYTHON_CFLAGS python3_9 "*-I/usr/include/python3.9*"
- test_var PYTHON_LIBS python3_9 "*-lpython3.9*"
-fi
-test_var PYTHON_PKG_DEP python3_9 '*dev-lang/python*:3.9'
-test_var PYTHON_SCRIPTDIR python3_9 /usr/lib/python-exec/python3.9
-
-test_var EPYTHON python3_10 python3.10
-test_var PYTHON python3_10 /usr/bin/python3.10
-if [[ -x /usr/bin/python3.10 ]]; then
- abiflags=$(/usr/bin/python3.10 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
- test_var PYTHON_SITEDIR python3_10 "/usr/lib/python3.10/site-packages"
- test_var PYTHON_INCLUDEDIR python3_10 "/usr/include/python3.10${abiflags}"
- test_var PYTHON_LIBPATH python3_10 "/usr/lib*/libpython3.10${abiflags}$(get_libname)"
- test_var PYTHON_CONFIG python3_10 "/usr/bin/python3.10${abiflags}-config"
- test_var PYTHON_CFLAGS python3_10 "*-I/usr/include/python3.10*"
- test_var PYTHON_LIBS python3_10 "*-lpython3.10*"
-fi
-test_var PYTHON_PKG_DEP python3_10 '*dev-lang/python*:3.10'
-test_var PYTHON_SCRIPTDIR python3_10 /usr/lib/python-exec/python3.10
+for minor in 6 7 8 9 10 11; do
+ ebegin "Testing python3.${minor}"
+ eindent
+ test_var EPYTHON "python3_${minor}" "python3.${minor}"
+ test_var PYTHON "python3_${minor}" "/usr/bin/python3.${minor}"
+ if [[ -x /usr/bin/python3.${minor} ]]; then
+ abiflags=$(/usr/bin/python3.${minor} -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
+ test_var PYTHON_SITEDIR "python3_${minor}" "/usr/lib*/python3.${minor}/site-packages"
+ test_var PYTHON_INCLUDEDIR "python3_${minor}" "/usr/include/python3.${minor}${abiflags}"
+ test_var PYTHON_LIBPATH "python3_${minor}" "/usr/lib*/libpython3.${minor}${abiflags}$(get_libname)"
+ test_var PYTHON_CONFIG "python3_${minor}" "/usr/bin/python3.${minor}${abiflags}-config"
+ test_var PYTHON_CFLAGS "python3_${minor}" "*-I/usr/include/python3.${minor}*"
+ test_var PYTHON_LIBS "python3_${minor}" "*-lpython3.${minor}*"
+ fi
+ test_var PYTHON_PKG_DEP "python3_${minor}" "*dev-lang/python*:3.${minor}"
+ test_var PYTHON_SCRIPTDIR "python3_${minor}" "/usr/lib/python-exec/python3.${minor}"
+
+ tbegin "Testing that python3_${minor} is present in an impl array"
+ has "python3_${minor}" "${_PYTHON_ALL_IMPLS[@]}"
+ has_in_all=${?}
+ has "python3_${minor}" "${_PYTHON_HISTORICAL_IMPLS[@]}"
+ has_in_historical=${?}
+ if [[ ${has_in_all} -eq ${has_in_historical} ]]; then
+ if [[ ${has_in_all} -eq 1 ]]; then
+ eerror "python3_${minor} not found in _PYTHON_ALL_IMPLS or _PYTHON_HISTORICAL_IMPLS"
+ else
+ eerror "python3_${minor} listed both in _PYTHON_ALL_IMPLS and _PYTHON_HISTORICAL_IMPLS"
+ fi
+ fi
+ tend ${?}
+
+ tbegin "Testing that PYTHON_COMPAT accepts the impl"
+ (
+ # NB: we add pypy3 as we need to always have at least one
+ # non-historical impl
+ PYTHON_COMPAT=( pypy3 "python3_${minor}" )
+ _python_set_impls
+ )
+ tend ${?}
+
+ # these tests apply to py3.8+ only
+ if [[ ${minor} -ge 8 ]]; then
+ tbegin "Testing that _python_verify_patterns accepts stdlib version"
+ ( _python_verify_patterns "3.${minor}" )
+ tend ${?}
+
+ tbegin "Testing _python_impl_matches on stdlib version"
+ _python_impl_matches "python3_${minor}" "3.${minor}"
+ tend ${?}
+ fi
+
+ eoutdent
+done
+ebegin "Testing pypy3"
+eindent
test_var EPYTHON pypy3 pypy3
test_var PYTHON pypy3 /usr/bin/pypy3
if [[ -x /usr/bin/pypy3 ]]; then
@@ -155,9 +144,10 @@ if [[ -x /usr/bin/pypy3 ]]; then
fi
test_var PYTHON_PKG_DEP pypy3 '*dev-python/pypy3*:0='
test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
+eoutdent
for EPREFIX in '' /foo; do
- einfo "with EPREFIX=${EPREFIX@Q}"
+ einfo "Testing python_fix_shebang with EPREFIX=${EPREFIX@Q}"
eindent
# generic shebangs
test_fix_shebang '#!/usr/bin/python' python3.6 \
@@ -212,6 +202,8 @@ for EPREFIX in '' /foo; do
done
# check _python_impl_matches behavior
+einfo "Testing python_impl_matches"
+eindent
test_is "_python_impl_matches python3_6 -3" 0
test_is "_python_impl_matches python3_7 -3" 0
test_is "_python_impl_matches pypy3 -3" 0
@@ -232,6 +224,7 @@ test_is "_python_impl_matches python3_9 3.10" 1
test_is "_python_impl_matches pypy3 3.8" 1
test_is "_python_impl_matches pypy3 3.9" 0
test_is "_python_impl_matches pypy3 3.10" 1
+eoutdent
rm "${tmpfile}"
diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
index abd8fbe4ffb3..79717a6a79fa 100644
--- a/profiles/base/package.use.force
+++ b/profiles/base/package.use.force
@@ -219,6 +219,7 @@ app-shells/bash:0 readline
dev-lang/python-exec python_targets_python3_8
dev-lang/python-exec python_targets_python3_9
dev-lang/python-exec python_targets_python3_10
+dev-lang/python-exec python_targets_python3_11
dev-lang/python-exec python_targets_pypy3
# Zac Medico <zmedico@gentoo.org> (2010-10-20)
diff --git a/profiles/base/use.stable.mask b/profiles/base/use.stable.mask
index 23119a063249..db3f89d740ed 100644
--- a/profiles/base/use.stable.mask
+++ b/profiles/base/use.stable.mask
@@ -1,9 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# This file requires eapi 5 or later. New entries go on top.
# Please use the same syntax as in use.mask
+# Michał Górny <mgorny@gentoo.org> (2022-05-08)
+# Mask until dev-lang/python:3.11 becomes stable.
+python_targets_python3_11
+python_single_target_python3_11
+
# Brian Evans <grknight@gentoo.org> (2021-11-29)
# Mask 8.1 as it is currently unstable only
php_targets_php8-1
diff --git a/profiles/desc/python_single_target.desc b/profiles/desc/python_single_target.desc
index d670f950de72..6c978694943c 100644
--- a/profiles/desc/python_single_target.desc
+++ b/profiles/desc/python_single_target.desc
@@ -6,4 +6,5 @@
python3_8 - Build for Python 3.8 only
python3_9 - Build for Python 3.9 only
python3_10 - Build for Python 3.10 only
+python3_11 - Build for Python 3.11 only
pypy3 - Build for PyPy3 only
diff --git a/profiles/desc/python_targets.desc b/profiles/desc/python_targets.desc
index ba8b8ea5eff8..ad77fbf5b60f 100644
--- a/profiles/desc/python_targets.desc
+++ b/profiles/desc/python_targets.desc
@@ -6,4 +6,5 @@
python3_8 - Build with Python 3.8
python3_9 - Build with Python 3.9
python3_10 - Build with Python 3.10
+python3_11 - Build with Python 3.11
pypy3 - Build with PyPy3