Date: Wednesday, April 5, 2023 @ 17:34:58
  Author: felixonmars
Revision: 1437823

archrelease: copy trunk to community-staging-any

Added:
  python-hypothesis/repos/community-staging-any/
  python-hypothesis/repos/community-staging-any/PKGBUILD
    (from rev 1437822, python-hypothesis/trunk/PKGBUILD)

----------+
 PKGBUILD |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

Copied: python-hypothesis/repos/community-staging-any/PKGBUILD (from rev 
1437822, python-hypothesis/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-05 17:34:58 UTC (rev 1437823)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-hypothesis
+pkgver=6.59.0
+pkgrel=2
+pkgdesc="Advanced Quickcheck style testing library for Python"
+arch=('any')
+license=('MPL')
+url="https://hypothesis.readthedocs.org";
+depends=('python-attrs' 'python-sortedcontainers' 'python-exceptiongroup')
+optdepends=('python-pytz: for datetime and django module'
+            'python-faker: for fakefactory and django module'
+            'python-django: for django module'
+            'python-numpy: for numpy module'
+            'python-pytest: for pytest module'
+            'python-lark-parser: for lark module'
+            'python-libcst: for codemods module')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 
'python-wheel')
+checkdepends=('python-pytest' 'flake8' 'python-pytz' 'python-numpy' 
'python-faker'
+              'python-flaky' 'python-django' 'python-pandas' 
'python-dpcontracts'
+              'python-pytest-xdist' 'python-lark-parser' 'python-pexpect' 
'python-coverage'
+              'python-typing_extensions' 'python-black' 'python-fakeredis' 
'python-libcst')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-$pkgver.tar.gz";)
+sha512sums=('8d189576a45dc527c2adc0b36781a9323292aa3ed61ab1e0747c379d170c8a1907b787889ceb767d4814422d158c3cdd542360e75295605805b22d832a999777')
+
+prepare() {
+  mv hypothesis-hypothesis-python-$pkgver hypothesis-$pkgver
+}
+
+build() {
+  cd hypothesis-$pkgver/hypothesis-python
+
+  python -m build -nw
+}
+
+check() {
+  cd hypothesis-$pkgver/hypothesis-python
+
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  python examples/example_hypothesis_entrypoint/setup.py install 
--root="$PWD/tmp_install" --optimize=1
+
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  
PYTHONPATH="$PWD/tmp_install/$site_packages:$PWD/examples/example_hypothesis_entrypoint"
 \
+  PATH="$PWD/tmp_install/usr/bin:$PATH" \
+    pytest --ignore tmp_install || echo "Tests failed"
+}
+
+package() {
+  cd hypothesis-$pkgver/hypothesis-python
+
+  python -m installer -d "$pkgdir" dist/*.whl
+
+  # It's only present when tests are enabled, so adding -f
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  rm -rf "$pkgdir"/$site_packages/tests
+}

Reply via email to