summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-17 11:46:42 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-17 13:00:12 +0200
commitfdfbd571b3479078781323ec9cc4f5cc11bd4630 (patch)
tree2fef043533aa297ac9d290b846f6acb1a91e9654 /dev-python
parentdev-python/aiohttp-cors: Port to py3.9 (diff)
downloadgentoo-fdfbd571b3479078781323ec9cc4f5cc11bd4630.tar.gz
gentoo-fdfbd571b3479078781323ec9cc4f5cc11bd4630.tar.bz2
gentoo-fdfbd571b3479078781323ec9cc4f5cc11bd4630.zip
dev-python/hypothesis: Bump to 5.26.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/hypothesis/Manifest1
-rw-r--r--dev-python/hypothesis/hypothesis-5.26.0.ebuild68
-rw-r--r--dev-python/hypothesis/metadata.xml5
3 files changed, 74 insertions, 0 deletions
diff --git a/dev-python/hypothesis/Manifest b/dev-python/hypothesis/Manifest
index 75c79f01614b..9a22a3c33be2 100644
--- a/dev-python/hypothesis/Manifest
+++ b/dev-python/hypothesis/Manifest
@@ -7,3 +7,4 @@ DIST hypothesis-python-5.24.0.tar.gz 9040780 BLAKE2B 126a7e0a4d9df292445453035d4
DIST hypothesis-python-5.24.2.tar.gz 9050270 BLAKE2B 05043935afec77b23349b4973a2b3b9fafceba467754dcf3295d410561e3c76ff3c4b2996f5f14aea46b5b6a073e7db2a8be085d42df79ed6eb78eacd7539234 SHA512 88c1351b70355906cc57b667f2a863ac1334219e1721504ea76b1599d57fdf272a96263c365fe24882be9f83f28671998ebee28b0faea2190d9b6b39d2c2dc84
DIST hypothesis-python-5.24.3.tar.gz 9050345 BLAKE2B bfb47794edb3c1c6aee22e808a6d27af52f8176d307f9a585efa0f1e0d68adf9a902ed6f67405e77c6804f18e17a76486ab42f610807f6ee97535f950318a055 SHA512 7647d14ba805ad3ff6465e1d2c6d9104560c7ea31517777ab45e07da39efefa7109215d2f4074082620554ae4aa5ce5060bca5c923d11c14718f1efdae829986
DIST hypothesis-python-5.24.4.tar.gz 9054743 BLAKE2B 5c64c86ed58d8f0e4a07390b1b1b5e405878b9632bf14233e0515ad9d98ec6ddcc57bf39be6b61f53739d34e393b3af64c0d362880019d29a649a9523a0204e3 SHA512 147f4fa47b54bf3ec4dfcebf2a6c98cee26ea6780244ef99e181bada65978375ca7731ed05cb98f1b92f7a44a357faae374d97d489ec6e2318ff94e526cd9a40
+DIST hypothesis-python-5.26.0.tar.gz 9062003 BLAKE2B 7a75c6fb2205944fc64100708c38417a5d3f1dd602a7fc14a464acb79e5d91b5513e9080e23c9ec5547edc6dbbe3b6a2c0425077a697a5656c0112d65adbaefd SHA512 8fc23a5e753cffe4a6a6b1be68fa96042933ef7ec8f8c4f88fbf0901996da9de576457647bea55ff2ceca4d71db322f927847258ca9bda90e1fac9f19c79a42b
diff --git a/dev-python/hypothesis/hypothesis-5.26.0.ebuild b/dev-python/hypothesis/hypothesis-5.26.0.ebuild
new file mode 100644
index 000000000000..36a076362cee
--- /dev/null
+++ b/dev-python/hypothesis/hypothesis-5.26.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
+PYTHON_REQ_USE="threads(+),sqlite"
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="A library for property based testing"
+HOMEPAGE="https://github.com/HypothesisWorks/hypothesis https://pypi.org/project/hypothesis/"
+SRC_URI="https://github.com/HypothesisWorks/${PN}/archive/${PN}-python-${PV}.tar.gz"
+S="${WORKDIR}/${PN}-${PN}-python-${PV}/${PN}-python"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cli test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}]
+ >=dev-python/sortedcontainers-2.1.0[${PYTHON_USEDEP}]
+ cli? (
+ $(python_gen_cond_dep '
+ dev-python/black[${PYTHON_USEDEP}]
+ dev-python/click[${PYTHON_USEDEP}]
+ ' python3_{6..8})
+ )
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ >=dev-python/pytest-5.3.5[${PYTHON_USEDEP}]
+ !!<dev-python/typing-3.7.4.1
+ )
+"
+
+src_prepare() {
+ # avoid pytest-xdist dep for one test
+ sed -i -e 's:test_prints_statistics_given_option_under_xdist:_&:' \
+ tests/pytest/test_statistics.py || die
+ distutils-r1_src_prepare
+}
+
+python_prepare() {
+ if ! use cli || [[ ${EPYTHON} != python3.[678] ]]; then
+ sed -i -e '/console_scripts/d' setup.py || die
+ fi
+}
+
+python_test() {
+ pytest -vv tests/cover tests/pytest tests/quality ||
+ die "Tests fail with ${EPYTHON}"
+}
+
+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
+}
diff --git a/dev-python/hypothesis/metadata.xml b/dev-python/hypothesis/metadata.xml
index 91f12574aa26..7c5b75670d16 100644
--- a/dev-python/hypothesis/metadata.xml
+++ b/dev-python/hypothesis/metadata.xml
@@ -19,4 +19,9 @@
<remote-id type="pypi">hypothesis</remote-id>
<remote-id type="github">HypothesisWorks/hypothesis</remote-id>
</upstream>
+ <use>
+ <flag name="cli">
+ Install a CLI tool used to write tests.
+ </flag>
+ </use>
</pkgmetadata>