archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-oscrypto / repos / community-any / PKGBUILD
blob63de47ec44d21c6c907109023f41a2897d4c9bd4
1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 pkgname=python-oscrypto
3 pkgver=1.3.0
4 pkgrel=4
5 pkgdesc='Compiler-free Python crypto library backed by the OS'
6 arch=('any')
7 url='https://github.com/wbond/oscrypto'
8 license=('MIT')
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')
15 build() {
16         cd "${pkgname#python-}-$pkgver"
17         python -m build --wheel --no-isolation
20 check() {
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
30         )
32         cd "${pkgname#python-}-$pkgver"
33         pytest "${pytest_options[@]}"
36 package() {
37         cd "${pkgname#python-}-$pkgver"
38         python -m installer --destdir="$pkgdir" dist/*.whl
39         install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"