From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0E500158090 for ; Mon, 9 May 2022 20:33:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3D1EBE0855; Mon, 9 May 2022 20:33:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1ECE6E0855 for ; Mon, 9 May 2022 20:33:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1F717340DF1 for ; Mon, 9 May 2022 20:33:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D48EE439 for ; Mon, 9 May 2022 20:33:05 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1652128305.53fc3b443284eb94b3bfb4266ee0efb890441dbd.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/, eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/python-utils-r1.eclass eclass/tests/python-utils-r1.sh X-VCS-Directories: eclass/ eclass/tests/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 53fc3b443284eb94b3bfb4266ee0efb890441dbd X-VCS-Branch: master Date: Mon, 9 May 2022 20:33:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a725f891-20cd-4eb0-8229-0b875cdb8054 X-Archives-Hash: 6d751d8fbb02772edce0a85d962a6784 commit: 53fc3b443284eb94b3bfb4266ee0efb890441dbd Author: Michał Górny gentoo org> AuthorDate: Sun May 8 10:15:35 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon May 9 20:31:45 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53fc3b44 python-utils-r1.eclass: Add support for python3.11 Signed-off-by: Michał Górny gentoo.org> eclass/python-utils-r1.eclass | 10 ++++++---- eclass/tests/python-utils-r1.sh | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 7b1bd012a37e..2b22b0539ecb 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:3.11";; python*) PYTHON_PKG_DEP="dev-lang/python:${impl#python}";; pypy) diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index 9c41798c4727..e0fc0aab3c03 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -147,6 +147,20 @@ 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 +test_var EPYTHON python3_11 python3.11 +test_var PYTHON python3_11 /usr/bin/python3.11 +if [[ -x /usr/bin/python3.11 ]]; then + abiflags=$(/usr/bin/python3.11 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))') + test_var PYTHON_SITEDIR python3_11 "/usr/lib/python3.11/site-packages" + test_var PYTHON_INCLUDEDIR python3_11 "/usr/include/python3.11${abiflags}" + test_var PYTHON_LIBPATH python3_11 "/usr/lib*/libpython3.11${abiflags}$(get_libname)" + test_var PYTHON_CONFIG python3_11 "/usr/bin/python3.11${abiflags}-config" + test_var PYTHON_CFLAGS python3_11 "*-I/usr/include/python3.11*" + test_var PYTHON_LIBS python3_11 "*-lpython3.11*" +fi +test_var PYTHON_PKG_DEP python3_11 '*dev-lang/python*:3.11' +test_var PYTHON_SCRIPTDIR python3_11 /usr/lib/python-exec/python3.11 + test_var EPYTHON pypy3 pypy3 test_var PYTHON pypy3 /usr/bin/pypy3 if [[ -x /usr/bin/pypy3 ]]; then