blob: 4b5ceaa3fef0b4cdcc14b16e3a57435fcdb53ed6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
pkgname=python-hstspreload
_pkg="${pkgname#python-}"
pkgver=2024.12.1
pkgrel=2
pkgdesc="Chromium HSTS Preload list as a Python package"
arch=(any)
url="https://github.com/sethmlarson/hstspreload"
license=(BSD-3-Clause)
depends=(python)
makedepends=(python-build python-installer python-setuptools python-wheel)
#checkdepends=(python-pytest python-urllib3)
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/h/$_pkg/$_pkg-$pkgver.tar.gz")
sha256sums=('6c85a46b80df3ee9eb3d268fa98445abcfcc07329ba26c8f25203dfb8cc10f84')
build() {
cd $_pkg-$pkgver
python -m build --wheel --no-isolation
}
# This runs around 230k tests, checking to see if the online list matches the current one.
# It can take 5 minutes just to collect the tests. They're not distributed in the PyPI tarball.
#check() {
# cd "${srcdir}"/${_pkg}-${pkgver}
#
# python -m pytest
#}
package() {
cd $_pkg-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
install -vdm 755 "$pkgdir/usr/share/licenses/$pkgname/"
ln -sv "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}
|