Date: Saturday, February 4, 2023 @ 08:29:44
Author: grawlinson
Revision: 1392317
archrelease: copy trunk to community-x86_64
Added:
python-pyasn/repos/community-x86_64/
python-pyasn/repos/community-x86_64/PKGBUILD
(from rev 1392315, python-pyasn/trunk/PKGBUILD)
----------+
PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
Copied: python-pyasn/repos/community-x86_64/PKGBUILD (from rev 1392315,
python-pyasn/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2023-02-04 08:29:44 UTC (rev 1392317)
@@ -0,0 +1,58 @@
+# Maintainer: George Rawlinson <[email protected]>
+
+pkgname=python-pyasn
+pkgver=1.6.1
+pkgrel=3
+pkgdesc='Python IP address to Autonomous System Number lookup module'
+arch=('x86_64')
+url='https://github.com/hadiasghari/pyasn'
+license=('MIT' 'BSD') # SPDX:BSD-4-Clause
+# namcap complains about ordereddict, but this is only for Python 2
+# it also complains about urllib2, let's ignore that too
+depends=(
+ 'python'
+ 'python-ujson'
+)
+makedepends=(
+ 'git'
+ 'python-build'
+ 'python-installer'
+ 'python-wheel'
+ 'python-setuptools'
+)
+checkdepends=('python-pytest')
+_commit='1d64d6d2f20e0353b46fbf5b94f8bdea8f41e9ce'
+source=("$pkgname::git+$url#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe --tags | sed -e 's/^v//' -e 's/-re$//'
+}
+
+build() {
+ cd "$pkgname"
+
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "$pkgname"
+
+ # temporary install so pytest can pick up the compiled extension
+ python -m installer --destdir="$(pwd)/tmp" dist/*.whl
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+ export PYTHONPATH="$(pwd)/tmp/$site_packages"
+
+ pytest -v
+}
+
+package() {
+ cd "$pkgname"
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}