1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 pkgname=python-oscrypto
5 pkgdesc='Compiler-free Python crypto library backed by the OS'
7 url='https://github.com/wbond/oscrypto'
9 depends=('openssl' 'python' 'python-asn1crypto')
10 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
11 checkdepends=('python-pytest')
12 source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
13 sha512sums=('b5baf72e1a09615b267be4d1c4baf2375bb939b5bd3d717ca9ca70776541f590a8608bef95991967e23f3794e6220709ed2fe5acdedfe9bfce1921c879a74bec')
16 cd "${pkgname#python-}-$pkgver"
17 python -m build --wheel --no-isolation
21 local pytest_options=(
22 # https://github.com/wbond/oscrypto/issues/73
23 --deselect tests/test_tls.py::TLSTests::test_tls_connect_dh1024
24 --deselect tests/test_tls.py::TLSTests::test_tls_error_client_cert_required
25 --deselect tests/test_tls.py::TLSTests::test_tls_error_domain_mismatch
26 --deselect tests/test_tls.py::TLSTests::test_tls_error_san_mismatch
27 --deselect tests/test_tls.py::TLSTests::test_tls_error_wildcard_mismatch
28 --deselect tests/test_tls.py::TLSTests::test_tls_extra_trust_roots
29 --deselect tests/test_tls.py::TLSTests::test_tls_wildcard_success
32 cd "${pkgname#python-}-$pkgver"
33 pytest "${pytest_options[@]}"
37 cd "${pkgname#python-}-$pkgver"
38 python -m installer --destdir="$pkgdir" dist/*.whl
39 install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"