summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2024-04-27 12:56:36 +0200
committerCarl Smedstad2024-04-27 13:01:11 +0200
commite7f7210e05575fea55b15052ff67a28a6aaf2770 (patch)
tree5f9f3b3df3f35832763b7d6404966f049f7f5e2a
downloadaur-python-docopt-subcommands.tar.gz
upgpkg: 4.0.0-1
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore5
-rw-r--r--.nvchecker.toml3
-rw-r--r--PKGBUILD53
4 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cc2a7d6273ca
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = python-docopt-subcommands
+ pkgdesc = Create subcommand-based command-line programs with docopt
+ pkgver = 4.0.0
+ pkgrel = 1
+ url = https://github.com/abingham/docopt-subcommands
+ arch = any
+ license = MIT
+ checkdepends = python-hypothesis
+ checkdepends = python-pytest
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-setuptools
+ makedepends = python-wheel
+ depends = python
+ depends = python-docopt
+ source = python-docopt-subcommands-4.0.0.tar.gz::https://github.com/abingham/docopt-subcommands/archive/51e20890a6f7dfdce1f7556be2dd5fedb35a5fbf.tar.gz
+ sha256sums = 277614a679607ef90e88a69f5b635013cf5d24a0ab45049e32e0e732ca9ed7b1
+
+pkgname = python-docopt-subcommands
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0df2b70016b9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!.nvchecker.toml
+!.SRCINFO
+!PKGBUILD
diff --git a/.nvchecker.toml b/.nvchecker.toml
new file mode 100644
index 000000000000..2b10350b9654
--- /dev/null
+++ b/.nvchecker.toml
@@ -0,0 +1,3 @@
+[python-docopt-subcommands]
+source = "pypi"
+pypi = "docopt-subcommands"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..acf9712b1e80
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Carl Smedstad <carsme@archlinux.org>
+
+pkgname=python-docopt-subcommands
+_pkgname=${pkgname#python-}
+pkgver=4.0.0
+pkgrel=1
+_commit=51e20890a6f7dfdce1f7556be2dd5fedb35a5fbf
+pkgdesc="Create subcommand-based command-line programs with docopt"
+arch=(any)
+url="https://github.com/abingham/docopt-subcommands"
+license=(MIT)
+depends=(
+ python
+ python-docopt
+)
+makedepends=(
+ python-build
+ python-installer
+ python-setuptools
+ python-wheel
+)
+checkdepends=(
+ python-hypothesis
+ python-pytest
+)
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$_commit.tar.gz")
+sha256sums=('277614a679607ef90e88a69f5b635013cf5d24a0ab45049e32e0e732ca9ed7b1')
+
+_archive="$_pkgname-$_commit"
+
+build() {
+ cd "$_archive"
+
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "$_archive"
+
+ rm -rf tmp_install
+ python -m installer --destdir=tmp_install dist/*.whl
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ export PYTHONPATH="$PWD/tmp_install/$site_packages"
+ pytest
+}
+
+package() {
+ cd "$_archive"
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
+}