Date: Friday, April 7, 2023 @ 03:55:07
  Author: felixonmars
Revision: 1440393

archrelease: copy trunk to community-staging-x86_64

Added:
  python-pyasn/repos/community-staging-x86_64/
  python-pyasn/repos/community-staging-x86_64/PKGBUILD
    (from rev 1440392, python-pyasn/trunk/PKGBUILD)

----------+
 PKGBUILD |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

Copied: python-pyasn/repos/community-staging-x86_64/PKGBUILD (from rev 1440392, 
python-pyasn/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-04-07 03:55:07 UTC (rev 1440393)
@@ -0,0 +1,58 @@
+# Maintainer: George Rawlinson <[email protected]>
+
+pkgname=python-pyasn
+pkgver=1.6.1
+pkgrel=4
+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
+}

Reply via email to