[arch-commits] Commit in python-certifi/trunk (PKGBUILD)
Felix Yan
felixonmars at gemini.archlinux.org
Mon Jun 27 18:08:19 UTC 2022
Date: Monday, June 27, 2022 @ 18:08:19
Author: felixonmars
Revision: 1239721
upgpkg: python-certifi 2022.06.15-1
using system CA store now.
Modified:
python-certifi/trunk/PKGBUILD
----------+
PKGBUILD | 40 +++++++++++++++++++++++++++++-----------
1 file changed, 29 insertions(+), 11 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-06-27 17:13:09 UTC (rev 1239720)
+++ PKGBUILD 2022-06-27 18:08:19 UTC (rev 1239721)
@@ -3,25 +3,43 @@
# Contributor: William J Bowman <bluephoenix47 at gmail.com>
pkgname=python-certifi
-_libname=${pkgname/python-/}
-pkgver=2021.10.8
-pkgrel=3
-pkgdesc="Python package for providing Mozilla's CA Bundle"
+pkgver=2022.06.15
+pkgrel=1
+pkgdesc="Python package for providing Mozilla's CA Bundle (using system CA store)"
arch=(any)
-url="https://pypi.python.org/pypi/certifi"
+url="https://github.com/certifi/python-certifi"
license=('GPL')
-depends=('python')
+depends=('python' 'ca-certificates')
makedepends=('python-setuptools')
-source=("https://pypi.io/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz")
-sha512sums=('06dc41a471f16f6c52751854e82fb42011c9388651cff55761298b86ba437d431e6325ab039ef330f2b2c5f69f5ba43dc468e7ca3df205a8bb31468f43711fbe')
+checkdepends=('python-pytest')
+source=("https://github.com/certifi/python-certifi/archive/$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('ffd2b2f38ff297cb49a6efe912d43b5b87bc028c8ee44f07276ac3a2a98186692e496b5579a544bfee2724214aa6e91397c679837ee856513cc8635e3470f34f')
+prepare() {
+ cd python-certifi-$pkgver
+ # Use system CA store. Replacing the copy in the source tree so the test suite is actually run against it.
+ ln -sf /etc/ssl/certs/ca-certificates.crt certifi/cacert.pem
+ # Our CA store has non-ASCII comments, but we are not packaging for JVM
+ # https://github.com/certifi/python-certifi/issues/50
+ sed -i 's/encoding="ascii"/encoding="utf-8"/' certifi/core.py
+}
+
build() {
- cd "$srcdir/$_libname-$pkgver"
+ cd python-certifi-$pkgver
python setup.py build
}
+check() {
+ cd python-certifi-$pkgver
+ pytest
+}
+
package() {
- cd "$srcdir/$_libname-$pkgver"
+ cd python-certifi-$pkgver
python setup.py install --skip-build -O1 --root="$pkgdir"
- install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Replace CA store here again because the symlink was installed as a file
+ ln -sf /etc/ssl/certs/ca-certificates.crt "$pkgdir"/usr/lib/python3.10/site-packages/certifi/cacert.pem
+
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
More information about the arch-commits
mailing list