Date: Thursday, April 6, 2023 @ 22:13:20
  Author: dvzrv
Revision: 1440327

archrelease: copy trunk to community-staging-x86_64

Added:
  python-xmlsec/repos/community-staging-x86_64/PKGBUILD
    (from rev 1440326, python-xmlsec/trunk/PKGBUILD)
Deleted:
  python-xmlsec/repos/community-staging-x86_64/PKGBUILD

----------+
 PKGBUILD |   78 +++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 43 insertions(+), 35 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-06 22:13:04 UTC (rev 1440326)
+++ PKGBUILD    2023-04-06 22:13:20 UTC (rev 1440327)
@@ -1,35 +0,0 @@
-# Maintainer: Felix Yan <[email protected]>
-
-pkgname=python-xmlsec
-pkgver=1.3.13
-_commit=b483b644b6033e539f303509f5ee85bebf178a73
-pkgrel=2
-pkgdesc="Python bindings for the XML Security Library"
-url="https://github.com/mehcode/python-xmlsec";
-license=('MIT')
-arch=('x86_64')
-depends=('python-lxml' 'xmlsec')
-makedepends=('git' 'python-pkgconfig' 'python-setuptools-scm' 'python-wheel')
-checkdepends=('python-hypothesis' 'python-pytest')
-source=("git+https://github.com/mehcode/python-xmlsec.git#commit=$_commit";)
-sha512sums=('SKIP')
-
-build() {
-  cd python-xmlsec
-  python setup.py build
-}
-
-check() {
-  cd python-xmlsec
-  # https://github.com/mehcode/python-xmlsec/issues/84
-  PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-311" pytest \
-    --deselect 'tests/test_doc_examples.py::test_doc_example[encrypt.py]' \
-    --deselect 'tests/test_doc_examples.py::test_doc_example[sign.py]' \
-    --deselect 'tests/test_doc_examples.py::test_doc_example[verify.py]'
-}
-
-package() {
-  cd python-xmlsec
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
-}

Copied: python-xmlsec/repos/community-staging-x86_64/PKGBUILD (from rev 
1440326, python-xmlsec/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-04-06 22:13:20 UTC (rev 1440327)
@@ -0,0 +1,43 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-xmlsec
+pkgver=1.3.13
+_commit=b483b644b6033e539f303509f5ee85bebf178a73
+pkgrel=3
+pkgdesc="Python bindings for the XML Security Library"
+url="https://github.com/mehcode/python-xmlsec";
+license=('MIT')
+arch=('x86_64')
+depends=('python-lxml' 'xmlsec')
+makedepends=('git' 'python-build' 'python-installer' 'python-pkgconfig' 
'python-setuptools-scm' 'python-wheel')
+checkdepends=('python-hypothesis' 'python-pytest')
+source=("git+https://github.com/mehcode/python-xmlsec.git#commit=$_commit";)
+sha512sums=('SKIP')
+
+build() {
+  cd python-xmlsec
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  local pytest_options=(
+    # https://github.com/xmlsec/python-xmlsec/issues/84
+    --deselect 'tests/test_doc_examples.py::test_doc_example[encrypt.py]'
+    --deselect 'tests/test_doc_examples.py::test_doc_example[sign.py]'
+    --deselect 'tests/test_doc_examples.py::test_doc_example[verify.py]'
+    # https://github.com/xmlsec/python-xmlsec/issues/244
+    --deselect tests/test_ds.py::TestSignContext::test_sign_case5
+  )
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $pkgname
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
+  pytest -vv "${pytest_options[@]}"
+}
+
+package() {
+  cd python-xmlsec
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Reply via email to