Date: Thursday, April 6, 2023 @ 22:13:04 Author: dvzrv Revision: 1440326
upgpkg: python-xmlsec 1.3.13-3: Rebuild against Python 3.11. Disable another broken test: https://github.com/xmlsec/python-xmlsec/issues/244 Switch to PEP517. Modified: python-xmlsec/trunk/PKGBUILD ----------+ PKGBUILD | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-04-06 22:01:32 UTC (rev 1440325) +++ PKGBUILD 2023-04-06 22:13:04 UTC (rev 1440326) @@ -3,13 +3,13 @@ pkgname=python-xmlsec pkgver=1.3.13 _commit=b483b644b6033e539f303509f5ee85bebf178a73 -pkgrel=2 +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-pkgconfig' 'python-setuptools-scm' 'python-wheel') +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') @@ -16,20 +16,28 @@ build() { cd python-xmlsec - python setup.py build + python -m build --wheel --no-isolation } 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]' \ + 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 setup.py install --root="$pkgdir" --optimize=1 + python -m installer --destdir="$pkgdir" dist/*.whl install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ }
