Date: Thursday, April 6, 2023 @ 13:29:52
  Author: felixonmars
Revision: 1438894

archrelease: copy trunk to community-staging-any

Added:
  python-uri-template/repos/community-staging-any/
  python-uri-template/repos/community-staging-any/PKGBUILD
    (from rev 1438893, python-uri-template/trunk/PKGBUILD)

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

Copied: python-uri-template/repos/community-staging-any/PKGBUILD (from rev 
1438893, python-uri-template/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-06 13:29:52 UTC (rev 1438894)
@@ -0,0 +1,58 @@
+# Maintainer: George Rawlinson <[email protected]>
+
+pkgname=python-uri-template
+pkgver=1.2.0
+pkgrel=2
+pkgdesc='An implementation of RFC 6570 URI Templates'
+arch=('any')
+url='https://github.com/plinss/uri_template'
+license=('MIT')
+depends=('python')
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-wheel'
+  'python-setuptools'
+)
+_commit='ae070b1716c853fbc5a3c879e6ef1d1cfb2c9533'
+source=("$pkgname::git+$url#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+  cd "$pkgname"
+
+  # below string is extracted from upstream's setup.py
+  # version='0.0.0',  # version will get replaced by git version tag - do not 
edit
+  sed -e "s:\(version='\)0.0.0:\1$pkgver:" -i setup.py
+}
+
+build() {
+  cd "$pkgname"
+
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd "$pkgname"
+
+  python test.py
+}
+
+package() {
+  cd "$pkgname"
+
+  python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}

Reply via email to