diff --git a/dev-python/hypothesis/Manifest b/dev-python/hypothesis/Manifest index edf307ff1b415..7d0a61697c3a2 100644 --- a/dev-python/hypothesis/Manifest +++ b/dev-python/hypothesis/Manifest @@ -1,2 +1,3 @@ DIST hypothesis-6.151.10.gh.tar.gz 9866123 BLAKE2B b50c998fa6d742133fcfd8ee61a2cdb841b9d35f395fa9a80c9f958fea70d0c8e93e73d9394b06dd11dffa4b713435f9f5c4496752a91d3915f8f3d83050a601 SHA512 858199c46e5a9ccf6ea2efefe947815c4b9e5cd106871cadf3abcdcde06ebda32969220cc7cf1421d81174c3cb1db86b7fb724a32e6953fa0fbf339ab81b5bd8 +DIST hypothesis-6.151.11.gh.tar.gz 9866574 BLAKE2B a721b9d47552dba2828b233e04a0a01e401a600726ab2ed453f78600b07cde320bb45a6dfb3c42909f8d4f81066d23263db837526618480ca296269771ca66d4 SHA512 765f6822f8f7773e0c2251d4cae4e39edbe4db66efb93d60e4136ce7e66058ba378d1c15b62dcb1033081493b97a0ea44a8e7665c6c12f09d9cb61fc537f86bb DIST hypothesis-6.151.9.gh.tar.gz 9864451 BLAKE2B 9d9c2800cf1212e743a599c261c78c0a7d349e58075a443e0d10e6373b1582e059abde416cec4f3a8185ae424725f93da8ab4e43dd70bd0f86071d69aca94def SHA512 3e41bdd077a18fe72360547bc03f2c3d7218e8cd6cb563fffd6024427bfa5ce0764ca9c7ef0dafdded896625128fc14b9d3f8c4564aa8a509545abf0ad24adbf diff --git a/dev-python/hypothesis/hypothesis-6.151.11.ebuild b/dev-python/hypothesis/hypothesis-6.151.11.ebuild new file mode 100644 index 0000000000000..498c02099e89b --- /dev/null +++ b/dev-python/hypothesis/hypothesis-6.151.11.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +CLI_COMPAT=( python3_{11..13} ) +PYTHON_COMPAT=( "${CLI_COMPAT[@]}" pypy3_11 python3_14 python3_{13,14}t ) +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/sortedcontainers-2.1.0[${PYTHON_USEDEP}] + cli? ( + $(python_gen_cond_dep ' + dev-python/black[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + ' "${CLI_COMPAT[@]}") + ) +" +BDEPEND=" + test? ( + >=dev-python/attrs-22.2.0[${PYTHON_USEDEP}] + dev-python/pexpect[${PYTHON_USEDEP}] + >=dev-python/pytest-8[${PYTHON_USEDEP}] + ) +" +PDEPEND=" + dev-python/hypothesis-gentoo[${PYTHON_USEDEP}] +" + +EPYTEST_PLUGIN_LOAD_VIA_ENV=1 +EPYTEST_PLUGINS=( "${PN}" pytest-xdist ) +EPYTEST_RERUNS=5 +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +python_test() { + # NB: paths need to be relative to pytest.ini, + # i.e. start with hypothesis-python/ + local EPYTEST_DESELECT=( + # broken somehow (xdist?) + 'hypothesis-python/tests/pytest/test_constant_collection_timing.py::test_constant_collection_timing[True]' + ) + case ${EPYTHON} in + pypy3.11) + EPYTEST_DESELECT+=( + 'hypothesis-python/tests/cover/test_lambda_formatting.py::test_modifying_lambda_source_code_returns_unknown[False]' + ) + ;; + python3.14t) + EPYTEST_DESELECT+=( + # TODO + 'hypothesis-python/tests/cover/test_lambda_formatting.py::test_modifying_lambda_source_code_returns_unknown[False]' + ) + ;; + esac + + local -x HYPOTHESIS_NO_PLUGINS=1 + epytest -o filterwarnings= tests/{cover,pytest,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 +}