summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-12-09 05:23:39 +0100
committerMichał Górny <mgorny@gentoo.org>2024-12-09 06:45:40 +0100
commit543ab1cb6241e37ed9362c3f931133d29d923460 (patch)
treec4c5c4e1ef299c3ae0e49ec3cf7cbc321cea4d17 /dev-python/hypothesis
parentapp-text/texlive: Stabilize 2023-r1 sparc, #934402 (diff)
downloadgentoo-543ab1cb6241e37ed9362c3f931133d29d923460.tar.gz
gentoo-543ab1cb6241e37ed9362c3f931133d29d923460.tar.bz2
gentoo-543ab1cb6241e37ed9362c3f931133d29d923460.zip
dev-python/hypothesis: Bump to 6.122.3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/hypothesis')
-rw-r--r--dev-python/hypothesis/Manifest1
-rw-r--r--dev-python/hypothesis/hypothesis-6.122.3.ebuild104
2 files changed, 105 insertions, 0 deletions
diff --git a/dev-python/hypothesis/Manifest b/dev-python/hypothesis/Manifest
index dcc798babb28..7a5843b1b4c5 100644
--- a/dev-python/hypothesis/Manifest
+++ b/dev-python/hypothesis/Manifest
@@ -1,2 +1,3 @@
DIST hypothesis-6.119.4.gh.tar.gz 9490666 BLAKE2B 99a45054b90026317bca165915b2ffe3b3abfa03a98efc6181bd64f6ca851f9a90e4ba1b41ba4f3b2181de02818a91367f1c29523b78bca303da4eea31db1284 SHA512 003b01fd3e1e4ae2ea68f72b80063928dd56a069fdf8b6ffc73f6ffb3db4b048523564bd616d604d04a3ea55b19c01940ad7ba60bf1e88c54e29359ca0e397db
DIST hypothesis-6.122.1.gh.tar.gz 9492677 BLAKE2B 66f89d2388cb34e5df95bc73af69259c8460b0508b14b07b99d749443be44f0c43b20bfb1d2edddf844e97f18b20e98ceade1dc66d08ecfc8403fdb6f9a461dd SHA512 27e3fca0510cc4267f3ec4df112937fc1e06331d1498f0db1815912a6eaacd3fcb07705aed84db1f03212dae3bd3d4902071070c81694f9ae2df1a03d4964c14
+DIST hypothesis-6.122.3.gh.tar.gz 9495681 BLAKE2B af743d0486d31590639216e60901eb7ee376dfcce18a9e130ea5061788d9c9d66f1ebcec23f144d41652581e50c30903aa9d697e304cfe05259c454c344f02e0 SHA512 8776f603682a3ef7c36bc47f6e36b64b0e01c37f4db80fe78d492a3e4d347b4ec1d9c87e6999069d2cb4b5ac7d33e0d1258055b679fcacc6812b256e6398f043
diff --git a/dev-python/hypothesis/hypothesis-6.122.3.ebuild b/dev-python/hypothesis/hypothesis-6.122.3.ebuild
new file mode 100644
index 000000000000..dde5562c67da
--- /dev/null
+++ b/dev-python/hypothesis/hypothesis-6.122.3.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+CLI_COMPAT=( pypy3 python3_{10..13} )
+PYTHON_COMPAT=( "${CLI_COMPAT[@]}" )
+PYTHON_REQ_USE="threads(+),sqlite"
+
+inherit distutils-r1 optfeature
+
+TAG=hypothesis-python-${PV}
+MY_P=hypothesis-${TAG}
+DESCRIPTION="A library for property based testing"
+HOMEPAGE="
+ https://github.com/HypothesisWorks/hypothesis/
+ https://pypi.org/project/hypothesis/
+"
+SRC_URI="
+ https://github.com/HypothesisWorks/hypothesis/archive/${TAG}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S="${WORKDIR}/${MY_P}/hypothesis-python"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="cli"
+
+RDEPEND="
+ >=dev-python/attrs-22.2.0[${PYTHON_USEDEP}]
+ >=dev-python/sortedcontainers-2.1.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ >=dev-python/exceptiongroup-1.0.0_rc8[${PYTHON_USEDEP}]
+ ' 3.9 3.10)
+ cli? (
+ $(python_gen_cond_dep '
+ dev-python/black[${PYTHON_USEDEP}]
+ dev-python/click[${PYTHON_USEDEP}]
+ ' "${CLI_COMPAT[@]}")
+ )
+"
+BDEPEND="
+ test? (
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ >=dev-python/pytest-8[${PYTHON_USEDEP}]
+ dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+python_test() {
+ # subtests are broken by warnings from random plugins
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=xdist.plugin,_hypothesis_pytestplugin
+ local -x HYPOTHESIS_NO_PLUGINS=1
+
+ # NB: paths need to be relative to pytest.ini,
+ # i.e. start with hypothesis-python/
+ local EPYTEST_DESELECT=()
+ case ${EPYTHON} in
+ pypy3)
+ EPYTEST_DESELECT+=(
+ # failing due to warnings from numpy/cython
+ hypothesis-python/tests/pytest/test_fixtures.py::test_given_plus_overridden_fixture
+ )
+ ;;
+ esac
+
+ epytest -o filterwarnings= -p rerunfailures --reruns=5 \
+ tests/cover tests/pytest tests/quality
+}
+
+src_install() {
+ local HAD_CLI=
+
+ distutils-r1_src_install
+
+ if [[ ! ${HAD_CLI} ]]; then
+ rm -r "${ED}/usr/bin" || die
+ fi
+}
+
+python_install() {
+ distutils-r1_python_install
+ if use cli && has "${EPYTHON}" "${CLI_COMPAT[@]/_/.}"; then
+ HAD_CLI=1
+ else
+ rm -r "${D}$(python_get_scriptdir)" || die
+ fi
+}
+
+pkg_postinst() {
+ optfeature "datetime support" dev-python/pytz
+ optfeature "dateutil support" dev-python/python-dateutil
+ optfeature "numpy support" dev-python/numpy
+ optfeature "django support" dev-python/django dev-python/pytz
+ optfeature "pandas support" dev-python/pandas
+ optfeature "pytest support" dev-python/pytest
+}