1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: David Runge <dvzrv@archlinux.org>
3 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
4 # Contributor: William J Bowman <bluephoenix47@gmail.com>
9 pkgdesc="Python package for providing Mozilla's CA Bundle (using system CA store)"
11 url="https://github.com/certifi/python-certifi"
13 depends=(ca-certificates python)
14 makedepends=(python-build python-installer python-setuptools python-wheel)
15 checkdepends=(python-pytest)
16 source=(https://github.com/certifi/python-certifi/archive/$pkgver/$pkgname-$pkgver.tar.gz)
17 sha512sums=('4e255c0d5998e98c999464ea27dff61831e97de2c812d7b06feb7ad1038c3070f2e48c58fc939485f5d806d419f0273716442c3c86165b861f0d81f0b3393f6b')
21 # Use system CA store. Replacing the copy in the source tree so the test suite is actually run against it.
22 ln -sf /etc/ssl/certs/ca-certificates.crt certifi/cacert.pem
23 # Our CA store has non-ASCII comments, but we are not packaging for JVM
24 # https://github.com/certifi/python-certifi/issues/50
25 sed -i 's/encoding="ascii"/encoding="utf-8"/' certifi/core.py
30 python -m build --wheel --no-isolation
39 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
42 python -m installer --destdir="$pkgdir" dist/*.whl
44 # Replace CA store here again because the symlink was installed as a file
45 ln -sf /etc/ssl/certs/ca-certificates.crt "$pkgdir"/$site_packages/certifi/cacert.pem
47 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/