From a8b7944a2b4a290b82a1309165814a1c24b9b9e6 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Wed, 4 Nov 2020 14:58:48 -0500 Subject: [PATCH] python-hypothesis: split package New package: python3-hypothesis-5.41.1 --- srcpkgs/python-hypothesis/template | 32 +++++------------------------ srcpkgs/python3-hypothesis | 1 - srcpkgs/python3-hypothesis/template | 21 +++++++++++++++++++ srcpkgs/python3-hypothesis/update | 1 + 4 files changed, 27 insertions(+), 28 deletions(-) delete mode 120000 srcpkgs/python3-hypothesis create mode 100644 srcpkgs/python3-hypothesis/template create mode 100644 srcpkgs/python3-hypothesis/update diff --git a/srcpkgs/python-hypothesis/template b/srcpkgs/python-hypothesis/template index f5d24ead724..fdd629732bc 100644 --- a/srcpkgs/python-hypothesis/template +++ b/srcpkgs/python-hypothesis/template @@ -1,15 +1,13 @@ # Template file for 'python-hypothesis' pkgname=python-hypothesis version=4.38.2 -revision=4 +revision=5 wrksrc="hypothesis-hypothesis-python-${version}" build_wrksrc=hypothesis-python -build_style=python-module -pycompile_module="hypothesis" -hostmakedepends="python-setuptools python3-setuptools" +build_style=python2-module +hostmakedepends="python-setuptools" depends="python-attrs python-coverage python-enum34" -checkdepends="python-coverage python-enum34 python-pytest python3-coverage - python3-flaky python3-pytest python3-pytz python3-numpy" +checkdepends="python-coverage python-enum34 python-pytest" short_desc="Python2 library for property based testing" maintainer="Orphaned " license="MPL-2.0" @@ -19,25 +17,5 @@ distfiles="https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-pyth checksum=c53b652ed15350b0116bc1dd28516a71988437da772e25903309aa526f9c719e do_check() { - # In python3 mock is actually unittest.mock - vsed -e 's/from mock/from unittest.mock/' -i tests/cover/test_regressions.py - vsed -e 's/from mock/from unittest.mock/' -i tests/cover/test_reflection.py - - # Add variables that will be used by python to find the local - # hypothesis build - PY3PATH="${PWD}/build-${py3_ver}/lib" - PY2PATH="${PWD}/build-2.7/lib" - - PYTHONPATH="${PY3PATH}" python3 -m pytest tests/cover - PYTHONPATH="${PY3PATH}" python3 -m pytest tests/py3 - PYTHONPATH="${PY2PATH}" python2 -m pytest tests/py2 -} - -python3-hypothesis_package() { - pycompile_module="hypothesis" - depends="python3-attrs python3-coverage" - short_desc="${short_desc/Python2/Python3}" - pkg_install() { - vmove usr/lib/python3* - } + PYTHONPATH="${PWD}/build-2.7/lib" python2 -m pytest tests/py2 } diff --git a/srcpkgs/python3-hypothesis b/srcpkgs/python3-hypothesis deleted file mode 120000 index e2087b78468..00000000000 --- a/srcpkgs/python3-hypothesis +++ /dev/null @@ -1 +0,0 @@ -python-hypothesis \ No newline at end of file diff --git a/srcpkgs/python3-hypothesis/template b/srcpkgs/python3-hypothesis/template new file mode 100644 index 00000000000..21447be3843 --- /dev/null +++ b/srcpkgs/python3-hypothesis/template @@ -0,0 +1,21 @@ +# Template file for 'python3-hypothesis' +pkgname=python3-hypothesis +version=5.41.1 +revision=1 +wrksrc="hypothesis-hypothesis-python-${version}" +build_wrksrc=hypothesis-python +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-attrs python3-sortedcontainers" +checkdepends="python3-pytest python3-coverage python3-pexpect ${depends}" +short_desc="Python3 library for property based testing" +maintainer="Andrew J. Hesford " +license="MPL-2.0" +homepage="https://hypothesis.works/" +changelog="https://github.com/HypothesisWorks/hypothesis/raw/master/hypothesis-python/docs/changes.rst" +distfiles="https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-${version}.tar.gz" +checksum=bd0c89f6b889e2957f05872fa1c9bec7361fd992528024bef811a780d812f2e3 + +do_check() { + PYTHONPATH="${PWD}/build/lib" python3 -m pytest tests/cover +} diff --git a/srcpkgs/python3-hypothesis/update b/srcpkgs/python3-hypothesis/update new file mode 100644 index 00000000000..d92e11af955 --- /dev/null +++ b/srcpkgs/python3-hypothesis/update @@ -0,0 +1 @@ +pkgname=hypothesis-python