Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: python-xmlsec 1.3.13-3: Rebuild against Python 3.11.
Browse files Browse the repository at this point in the history
Disable another broken test: xmlsec/python-xmlsec#244
Switch to PEP517.

git-svn-id: file:///srv/repos/svn-community/svn@1440326 9fca08f4-af9d-4005-b8df-a31f2cc04f65
  • Loading branch information
dvzrv authored and svntogit committed Apr 6, 2023
1 parent 7d3e275 commit 2db877e
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,41 @@
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')

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/
}

0 comments on commit 2db877e

Please sign in to comment.