summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2023-11-07 05:37:09 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2023-11-07 05:37:09 +0000
commit437114ea3a2651dd2ecee4422e08b8ddda4619f9 (patch)
treef643c0e547f5ad0183e49b9e35435ee6856ad55f
parent2023-11-07 02:47:01 UTC (diff)
parentdev-python/pylatex: Remove old (diff)
downloadgentoo-437114ea3a2651dd2ecee4422e08b8ddda4619f9.tar.gz
gentoo-437114ea3a2651dd2ecee4422e08b8ddda4619f9.tar.bz2
gentoo-437114ea3a2651dd2ecee4422e08b8ddda4619f9.zip
Merge updates from master
-rw-r--r--app-admin/awscli/Manifest1
-rw-r--r--app-admin/awscli/awscli-1.29.79.ebuild86
-rw-r--r--app-misc/fastfetch/Manifest2
-rw-r--r--app-misc/fastfetch/fastfetch-2.2.2.ebuild (renamed from app-misc/fastfetch/fastfetch-2.2.1.ebuild)0
-rw-r--r--dev-python/boto3/Manifest1
-rw-r--r--dev-python/boto3/boto3-1.28.79.ebuild67
-rw-r--r--dev-python/botocore/Manifest1
-rw-r--r--dev-python/botocore/botocore-1.31.79.ebuild68
-rw-r--r--dev-python/numpy/numpy-1.26.1.ebuild6
-rw-r--r--dev-python/pylatex/Manifest1
-rw-r--r--dev-python/pylatex/pylatex-1.4.1.ebuild59
-rw-r--r--dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild8
-rw-r--r--eclass/distutils-r1.eclass32
-rw-r--r--eclass/python-utils-r1.eclass31
14 files changed, 278 insertions, 85 deletions
diff --git a/app-admin/awscli/Manifest b/app-admin/awscli/Manifest
index 425c59d83c87..6b8af37715fd 100644
--- a/app-admin/awscli/Manifest
+++ b/app-admin/awscli/Manifest
@@ -2,3 +2,4 @@ DIST aws-cli-1.29.68.gh.tar.gz 2565226 BLAKE2B b1f2209738c3a54beac322b14ceb54d31
DIST aws-cli-1.29.73.gh.tar.gz 2569425 BLAKE2B 14950fd5c67726779f621dd039bfb7d3c24ab083530b3923aec52f1433a9110455e7ef5aa529ddad3b576e30d6cdd3d40fc94a14f06638756c7347475d8b8e7e SHA512 2a85489d8052b968a083dbff7f9e31d9ffbfce60617ffdacaa65d5d7a9d4c05e70785f230e2e8b2f92c47be9a0b86147ea76a9ffa588b768818e5e64ef4aa280
DIST aws-cli-1.29.77.gh.tar.gz 2572839 BLAKE2B c79219e4c8e711efdfeb8a2f49fe9bfe599581f769643ec7c85fa3ba81c58897bf0b88e02c46705ace0a7ef4e1a5704fe4b702426695675cb1b687c103d286af SHA512 5a88a90cc56f0324f794e8320316b415d21ce6ff12975979e94db632a92746f038387e139887e171102c8a18c4555dec339d2fd5d240b3b31f47fcff2c662f53
DIST aws-cli-1.29.78.gh.tar.gz 2573503 BLAKE2B 6782a7774568adf5296461e19d71b9de992d9301e3d9c50b97c641448ea0fb9e161feb80cdbce50291fce7d37eaabbc92740ca6b26f432cc5b9105233c2949f8 SHA512 455e6cacb935c1075d9730dda3147dc17598ca01ff9224b9a5f0dffa003a10fb3f2f2e17db1aea9e44b353a5fdd1e3b692308b895ba79ef6433804156ba54b1d
+DIST aws-cli-1.29.79.gh.tar.gz 2574359 BLAKE2B fab1016d0b909c593d5fab7facf23e2cc744bc59c6c9ebbadd239b8920d255fe91e74080ba9a96f262b76b58325adb7a334914dd3a2c2e15842891e9630ec379 SHA512 d4f0fe2db2dcbae2664f7cd27259d83c85e92f126418c57fedf633f84ac783384592a229a9185ae75f804cdf93c3fed01c586a4243ff39ac22389ba847e1726d
diff --git a/app-admin/awscli/awscli-1.29.79.ebuild b/app-admin/awscli/awscli-1.29.79.ebuild
new file mode 100644
index 000000000000..e5b1ee0667a3
--- /dev/null
+++ b/app-admin/awscli/awscli-1.29.79.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit bash-completion-r1 distutils-r1
+
+MY_P=aws-cli-${PV}
+DESCRIPTION="Universal Command Line Environment for AWS"
+HOMEPAGE="
+ https://github.com/aws/aws-cli/
+ https://pypi.org/project/awscli/
+"
+SRC_URI="
+ https://github.com/aws/aws-cli/archive/${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+# botocore is x.(y+2).z
+BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 2)).$(ver_cut 3-)"
+RDEPEND="
+ >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
+ dev-python/colorama[${PYTHON_USEDEP}]
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/rsa[${PYTHON_USEDEP}]
+ >=dev-python/s3transfer-0.7.0[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ !app-admin/awscli-bin
+"
+BDEPEND="
+ test? (
+ dev-python/pytest-forked[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+ # do not rely on bundled deps in botocore (sic!)
+ find -name '*.py' -exec sed -i \
+ -e 's:from botocore[.]vendored import:import:' \
+ -e 's:from botocore[.]vendored[.]:from :' \
+ {} + || die
+ # strip overzealous upper bounds on requirements
+ sed -i -e 's:,<[0-9.]*::' -e 's:==:>=:' setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local serial_tests=(
+ tests/functional/ecs/test_execute_command.py::TestExecuteCommand::test_execute_command_success
+ tests/functional/ssm/test_start_session.py::TestSessionManager::test_start_session_{fails,success}
+ tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking
+ tests/unit/customizations/codeartifact/test_adapter_login.py::TestDotNetLogin::test_login_dotnet_sources_listed_with_backtracking_windows
+ tests/unit/customizations/codeartifact/test_adapter_login.py::TestNuGetLogin::test_login_nuget_sources_listed_with_backtracking
+ tests/unit/customizations/ecs/test_executecommand_startsession.py::TestExecuteCommand::test_execute_command_success
+ tests/unit/test_compat.py::TestIgnoreUserSignals
+ tests/unit/test_help.py
+ )
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest "${serial_tests[@]}"
+
+ local EPYTEST_DESELECT=( "${serial_tests[@]}" )
+ # integration tests require AWS credentials and Internet access
+ epytest tests/{functional,unit}
+}
+
+python_install_all() {
+ newbashcomp bin/aws_bash_completer aws
+
+ insinto /usr/share/zsh/site-functions
+ newins bin/aws_zsh_completer.sh _aws
+
+ distutils-r1_python_install_all
+
+ rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
+}
diff --git a/app-misc/fastfetch/Manifest b/app-misc/fastfetch/Manifest
index 2c9b58a91e3a..a783dd24ee3c 100644
--- a/app-misc/fastfetch/Manifest
+++ b/app-misc/fastfetch/Manifest
@@ -1,2 +1,2 @@
DIST fastfetch-1.12.2.tar.gz 538194 BLAKE2B bc6badbc7f690dacbe1408479286a0d42ec687526f776ff4d2ec7b0eb767032e5781cbbe37778f4dc03a5d386979a9ae2aab84c466be997b82d9a9a6c81ea78f SHA512 a82a7c7ae365335c20d659a82215cf320c4c6b07ff127c4dad322a0a01f7ec57e34d229f4953108daadcd0d243c84f8504a3b4367df5e255e5a06e685fd6739a
-DIST fastfetch-2.2.1.tar.gz 899131 BLAKE2B bc40bb876b11a41f211f265c6b760ec2905c2d10240c67f514da4f70935f40ff1759ac52bbf5183e96537ab8a963d1df5bf9ebc527927f25d1a453243495ccef SHA512 ba9eb36dd11a5346ed0ad452aecaf79e556fd91e91c6fa6e19c8b04c401f4ff383687c8afe5b2cba2281b086859246e16e2ac231f46893217d4f1241b6f4a439
+DIST fastfetch-2.2.2.tar.gz 900528 BLAKE2B 435e42748d24c7dc20bc5081fb45b55d71391a60f830d3dd18b63c604f09c4e8c66ce4a58a1e80e9e78cf7886805fbddc3e9e46a85d6f93cf219b1cbf9789c11 SHA512 f4ba2b9ffd68fe76043089595445d3f2227152292dfeaf9ecaa45dd18def0c1dd3a9e113aea92bd2361699bdef7a44e1bdc45486b2f3f123428c500e747a0bb5
diff --git a/app-misc/fastfetch/fastfetch-2.2.1.ebuild b/app-misc/fastfetch/fastfetch-2.2.2.ebuild
index f3c91c217ba1..f3c91c217ba1 100644
--- a/app-misc/fastfetch/fastfetch-2.2.1.ebuild
+++ b/app-misc/fastfetch/fastfetch-2.2.2.ebuild
diff --git a/dev-python/boto3/Manifest b/dev-python/boto3/Manifest
index 8f415e356746..c28f88374424 100644
--- a/dev-python/boto3/Manifest
+++ b/dev-python/boto3/Manifest
@@ -2,3 +2,4 @@ DIST boto3-1.28.68.gh.tar.gz 717553 BLAKE2B dd8ba562613456e30c0f8bfe2f3befa9601b
DIST boto3-1.28.73.gh.tar.gz 720995 BLAKE2B 1ac1c85be9e095ebab3394c5b7bdc48e0ba05e97bc3e463c3fab5d6a3f46e14078f05466042cdf58250c901a42b4b80149874ee0a157b47616da8f9e65a1dbe1 SHA512 2a5f4c9e4cf86bc1b7d285d034873cedf2ada05a65ca64be3c449de8e33a351b813e4f939543cba11c183f0adb127728f20f9b769bdb2802712b47ccaa135dcb
DIST boto3-1.28.77.gh.tar.gz 723612 BLAKE2B e2a2d3919f2f0ad09c0385b5f93bf4167c003e675ac0d3d3885ed9ab5c66ce401632bbff81f9a93bddc0063ab381233607b663f5a0a6763ddb4156c3f4a5e420 SHA512 31ded8367abbe8b99e0a09f25399755e3e2912e1efb92a902ab3404498d23dcf5958217e4ae30c953ad1d588b1eb2327167ef81b70f5683e4bc90f12b96970f9
DIST boto3-1.28.78.gh.tar.gz 724185 BLAKE2B 5089a7d1eab11c23bd65699c41c3c6687f0666f10ebcc7fc4813f96225ceee5a10a008ae6969cd7927f43f09e0988178ea40386bcd91c473ac5fba1dedeeeef1 SHA512 e74f7348d369580e8d26f7c1f084276ec339d4bdd3ee628bdbe56cc6e4b1c0b22a759bb4ffe1075f0cb0d6f1692864db85a73d3cb884358dc97d6428f3fd9b0a
+DIST boto3-1.28.79.gh.tar.gz 724864 BLAKE2B b6327a3dfd0095078668c85fb539885cdbc848a73b67afeaf97f58cb7362b1f928c49cb3cb233873b59ac925b9e97bc0571129f478177802f1249ddaa597297a SHA512 55eaf9e8122ef2f3424caa86f838fe03028a666aad281b6c52e0c8629c9d64707e1659c6d2e21666fe805f60cdde2ef0aece744737952cd55a20165c1d8186af
diff --git a/dev-python/boto3/boto3-1.28.79.ebuild b/dev-python/boto3/boto3-1.28.79.ebuild
new file mode 100644
index 000000000000..0604e0996a82
--- /dev/null
+++ b/dev-python/boto3/boto3-1.28.79.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="The AWS SDK for Python"
+HOMEPAGE="
+ https://github.com/boto/boto3/
+ https://pypi.org/project/boto3/
+"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+if [[ "${PV}" == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/boto/boto3"
+ inherit git-r3
+ BOTOCORE_PV=${PV}
+else
+ SRC_URI="
+ https://github.com/boto/boto3/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ "
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+ # botocore is x.(y+3).z
+ BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 3)).$(ver_cut 3-)"
+fi
+
+RDEPEND="
+ >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
+ >=dev-python/jmespath-0.7.1[${PYTHON_USEDEP}]
+ >=dev-python/s3transfer-0.7.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # don't lock versions to narrow ranges
+ sed -e '/botocore/ d' \
+ -e '/jmespath/ d' \
+ -e '/s3transfer/ d' \
+ -i setup.py || die
+
+ # do not rely on bundled deps in botocore (sic!)
+ find -name '*.py' -exec sed -i \
+ -e 's:from botocore[.]vendored import:import:' \
+ -e 's:from botocore[.]vendored[.]:from :' \
+ {} + || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests/{functional,unit}
+}
diff --git a/dev-python/botocore/Manifest b/dev-python/botocore/Manifest
index 404257ddc455..238dc59415b8 100644
--- a/dev-python/botocore/Manifest
+++ b/dev-python/botocore/Manifest
@@ -2,3 +2,4 @@ DIST botocore-1.31.68.gh.tar.gz 11989788 BLAKE2B d8d34511e3ef65f54e1b305cf60cdb9
DIST botocore-1.31.73.gh.tar.gz 12009409 BLAKE2B 949ecb6e85141ca8e3c01e05f996e47f63e0967ec85dde5772f27d564abca001c642ca1991f45b8fec05f7c105f22f713c5e3a8b5e8a8ea3a1a2026abc92fdac SHA512 cd9f77aad6f17d06a04206abc2ae34285423581f6ae5d1c70635d43dc22d73d46842048f0a0f955147c8fb5e5a071e8d4d597a3f9c28146c74957f4b18c8cd22
DIST botocore-1.31.77.gh.tar.gz 12031161 BLAKE2B 24e4daa5b0ae49dc2fd8851b459f3a55dba244a155a702d80e737d578c80de93c5e4d098f209663cf1310e99397991e84bcc20ba98a301763b29f730e5b4e2e2 SHA512 4d70b0df102b2a8098e747e30764ef5d96b3d9d0e3deeae7e2fc30c510ab279e6942d4c832ff1a23ab076213836d0e547bb61c521367659af08757285e6874f3
DIST botocore-1.31.78.gh.tar.gz 12035206 BLAKE2B 0dd1109d34a8cf99af76f1f615095776e75c0042717a573da3714d1e20efce5cf67bf38d5421c3c5558112821adb4307f7ca0791efc8e62c9ea2e9ba8c2ddc7a SHA512 68c0f68b699ff0c0276cc70f4d4843259a953511c9c2813a3101d7dc43c36a0a3bda68df66a7ab2c206977a96ce0d933830b4004898f03febf478c710beb5261
+DIST botocore-1.31.79.gh.tar.gz 12039146 BLAKE2B 9c4c8609e75e1d95130fc4919bba318732a09a884cd6256f86557bef13f8dbdf46d7ec57584c7132b53a17ad50feb3240ad4e6c3306bf9ae974e693f14e7d65c SHA512 84669e6c3c0fa9991ece0d65dd03e9d68d9c03cadef4477c96d1d45a3bce03534fa489a996725078be294b42dafc54c78ec527cbe7e3e015317642c0f80e9e47
diff --git a/dev-python/botocore/botocore-1.31.79.ebuild b/dev-python/botocore/botocore-1.31.79.ebuild
new file mode 100644
index 000000000000..05766e84276c
--- /dev/null
+++ b/dev-python/botocore/botocore-1.31.79.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Low-level, data-driven core of boto 3"
+HOMEPAGE="
+ https://github.com/boto/botocore/
+ https://pypi.org/project/botocore/
+"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+if [[ "${PV}" == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/boto/botocore"
+ inherit git-r3
+else
+ SRC_URI="
+ https://github.com/boto/botocore/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ "
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+RDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ <dev-python/jmespath-2[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ >=dev-python/urllib3-1.25.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+ # unpin deps
+ sed -i -e "s:>=.*':':" setup.py || die
+
+ # unbundle deps
+ rm -r botocore/vendored || die
+ find -name '*.py' -exec sed -i \
+ -e 's:from botocore[.]vendored import:import:' \
+ -e 's:from botocore[.]vendored[.]:from :' \
+ {} + || die
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # rely on bundled six
+ tests/functional/test_six_imports.py::test_no_bare_six_imports
+ tests/functional/test_six_threading.py::test_six_thread_safety
+ )
+
+ local -x EPYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests/{functional,unit}
+}
diff --git a/dev-python/numpy/numpy-1.26.1.ebuild b/dev-python/numpy/numpy-1.26.1.ebuild
index 3255d05e2c00..955652eea0d8 100644
--- a/dev-python/numpy/numpy-1.26.1.ebuild
+++ b/dev-python/numpy/numpy-1.26.1.ebuild
@@ -9,7 +9,7 @@ PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
-inherit distutils-r1 flag-o-matic fortran-2 multiprocessing pypi toolchain-funcs
+inherit distutils-r1 flag-o-matic fortran-2 pypi toolchain-funcs
DESCRIPTION="Fast array and numerical python library"
HOMEPAGE="
@@ -46,11 +46,11 @@ BDEPEND="
' 'python*')
dev-python/charset-normalizer[${PYTHON_USEDEP}]
>=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
>=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
)
"
+EPYTEST_XDIST=1
distutils_enable_tests pytest
python_prepare_all() {
@@ -143,7 +143,7 @@ python_test() {
esac
rm -rf numpy || die
- epytest -n "$(makeopts_jobs)" --pyargs numpy
+ epytest --pyargs numpy
}
python_install_all() {
diff --git a/dev-python/pylatex/Manifest b/dev-python/pylatex/Manifest
index 1b21a4292d95..de252896d2ec 100644
--- a/dev-python/pylatex/Manifest
+++ b/dev-python/pylatex/Manifest
@@ -1,2 +1 @@
DIST PyLaTeX-1.4.2.gh.tar.gz 307158 BLAKE2B bc20478759fc8315fd7fa2161d1638035c0dad4731c4cb254c78dfc45da2b361b3864d2ec04d6eb8fd7947e9908610eb0104444edff95666abba6a9f6da4cb4b SHA512 dcbe58de0ab715d6fbb571a7ad3981c875eacd08d06244b8715fa240df6f8f072417ae076a5caee204e000bf7eb55097b9ba49eddb5ce666470e494c15aa88ed
-DIST pylatex-1.4.1.tar.gz 301482 BLAKE2B c68c8bbf70c5099b3c3146922afe94dcf4f90bfc8644fa165ee27835f4a24642645f9849f2f9fd69656dc07dcc4807869275aacf33a1e5b9c59e539801f8e821 SHA512 55a5734e4d239cef4bcaafa0ba64eea013ba3e86d137de5a5f8311d70c949d783e2e7aad24d39d16a6febbe4bddc34e47248068e1328fe3f95f39a7c7019a3a9
diff --git a/dev-python/pylatex/pylatex-1.4.1.ebuild b/dev-python/pylatex/pylatex-1.4.1.ebuild
deleted file mode 100644
index 55e919e2046a..000000000000
--- a/dev-python/pylatex/pylatex-1.4.1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 2020-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MY_PN="PyLaTeX"
-MY_P="${MY_PN}-${PV}"
-
-PYTHON_COMPAT=( python3_{9..11} )
-DISTUTILS_USE_PEP517=setuptools
-
-inherit distutils-r1 optfeature
-
-DESCRIPTION="A Python library for creating LaTeX files and snippets"
-HOMEPAGE="https://github.com/JelteF/PyLaTeX"
-SRC_URI="https://github.com/JelteF/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="examples"
-
-RDEPEND="
- dev-python/ordered-set[${PYTHON_USEDEP}]
-"
-
-distutils_enable_tests pytest
-
-BDEPEND+="
- test? (
- dev-python/quantities[${PYTHON_USEDEP}]
- dev-python/matplotlib[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- app-text/texlive
- dev-texlive/texlive-latexextra
- )"
-
-python_prepare_all() {
- sed -i -e 's:description-file:description_file:' setup.cfg || die # bug 798381
-
- distutils-r1_python_prepare_all
-}
-
-python_install_all() {
- if use examples ; then
- dodoc -r examples
- docompress -x /usr/share/doc/"${PF}"/examples
- fi
-
- distutils-r1_python_install_all
-}
-
-pkg_postinst() {
- optfeature "compiling generated files" "app-text/texlive dev-texlive/texlive-latexextra dev-texlive/texlive-mathscience"
- optfeature "matplotlib support" dev-python/matplotlib
- optfeature "numpy support" dev-python/numpy
- optfeature "quantities support" dev-python/quantities
-}
diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild
index 47947453dc89..2bfd9a737bdd 100644
--- a/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild
+++ b/dev-python/pyrate-limiter/pyrate-limiter-3.1.0.ebuild
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{10..11} )
-inherit distutils-r1 multiprocessing pypi
+inherit distutils-r1 pypi
DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family"
HOMEPAGE="
@@ -26,7 +26,6 @@ RDEPEND="
BDEPEND="
test? (
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
)
"
@@ -37,6 +36,7 @@ EPYTEST_DESELECT=(
# Python 3.11 is slightly faster, leading to a non-critical failure here
"tests/test_concurrency.py::test_concurrency[ProcessPoolExecutor-SQLiteBucket]"
)
+EPYTEST_XDIST=1
# TODO: package sphinx-copybutton
# distutils_enable_sphinx docs \
@@ -67,7 +67,3 @@ src_test() {
# Clean up afterwards
kill "$(<"${redis_pid}")" || die
}
-
-python_test() {
- epytest -n "$(makeopts_jobs)" --dist=worksteal
-}
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1cc91110dccf..3d756eaad556 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -608,18 +608,28 @@ distutils_enable_tests() {
esac
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
- local test_pkg
+
+ local test_deps=${RDEPEND}
+ local test_pkgs
case ${1} in
nose)
- test_pkg=">=dev-python/nose-1.3.7_p20221026"
+ test_pkgs='>=dev-python/nose-1.3.7_p20221026[${PYTHON_USEDEP}]'
;;
pytest)
- test_pkg=">=dev-python/pytest-7.3.1"
+ test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]'
+ if [[ ${EPYTEST_XDIST} ]]; then
+ test_pkgs+=' dev-python/pytest-xdist[${PYTHON_USEDEP}]'
+ fi
;;
setup.py)
;;
unittest)
- # dep handled below
+ # unittest-or-fail is needed in py<3.12
+ test_deps+="
+ $(python_gen_cond_dep '
+ dev-python/unittest-or-fail[${PYTHON_USEDEP}]
+ ' 3.10 3.11)
+ "
;;
*)
die "${FUNCNAME}: unsupported argument: ${1}"
@@ -628,22 +638,14 @@ distutils_enable_tests() {
_DISTUTILS_TEST_RUNNER=${1}
python_test() { distutils-r1_python_test; }
- local test_deps=${RDEPEND}
- if [[ -n ${test_pkg} ]]; then
+ if [[ -n ${test_pkgs} ]]; then
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
- test_deps+=" ${test_pkg}[${PYTHON_USEDEP}]"
+ test_deps+=" ${test_pkgs//'${PYTHON_USEDEP}'/${PYTHON_USEDEP}}"
else
test_deps+=" $(python_gen_cond_dep "
- ${test_pkg}[\${PYTHON_USEDEP}]
+ ${test_pkgs}
")"
fi
- elif [[ ${1} == unittest ]]; then
- # unittest-or-fail is needed in py<3.12
- test_deps+="
- $(python_gen_cond_dep '
- dev-python/unittest-or-fail[${PYTHON_USEDEP}]
- ' 3.{9..11})
- "
fi
if [[ -n ${test_deps} ]]; then
IUSE+=" test"
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 4a538f9942f6..80abe974f9df 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1307,6 +1307,21 @@ _python_check_occluded_packages() {
# parameter, when calling epytest. The listed files will be entirely
# skipped from test collection.
+# @ECLASS_VARIABLE: EPYTEST_XDIST
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set to a non-empty value, enables running tests in parallel
+# via pytest-xdist plugin. If this variable is set prior to calling
+# distutils_enable_tests in distutils-r1, a test dependency
+# on dev-python/pytest-xdist is added automatically.
+
+# @ECLASS_VARIABLE: EPYTEST_JOBS
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Specifies the number of jobs for parallel (pytest-xdist) test runs.
+# When unset, defaults to -j from MAKEOPTS, or the current nproc.
+
# @FUNCTION: epytest
# @USAGE: [<args>...]
# @DESCRIPTION:
@@ -1371,6 +1386,22 @@ epytest() {
-p no:plus
-p no:tavern
)
+
+ if [[ ${EPYTEST_XDIST} ]]; then
+ local jobs=${EPYTEST_JOBS:-$(makeopts_jobs)}
+ if [[ ${jobs} -gt 1 ]]; then
+ args+=(
+ # explicitly enable the plugin, in case the ebuild was using
+ # PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ -p xdist
+ -n "${jobs}"
+ # worksteal ensures that workers don't end up idle when heavy
+ # jobs are unevenly distributed
+ --dist=worksteal
+ )
+ fi
+ fi
+
local x
for x in "${EPYTEST_DESELECT[@]}"; do
args+=( --deselect "${x}" )