Mail archive
alpine-aports

[alpine-aports] [PATCH 1/3] New aport: testing/py-sh

From: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
Date: Tue, 16 Oct 2018 16:03:31 +0200

Call any program from python as if it were a function
https://github.com/amoffat/sh
---
 testing/py-sh/APKBUILD | 51 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 testing/py-sh/APKBUILD
diff --git a/testing/py-sh/APKBUILD b/testing/py-sh/APKBUILD
new file mode 100644
index 0000000000..9a6c7cf5a4
--- /dev/null
+++ b/testing/py-sh/APKBUILD
_at_@ -0,0 +1,51 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
+pkgname=py-sh
+_pkgname="${pkgname#py-}"
+pkgver=1.12.14
+pkgrel=0
+pkgdesc="Call any program from python as if it were a function"
+url="https://github.com/amoffat/sh"
+arch="noarch"
+license="MIT"
+makedepends="py-setuptools python2-dev python3-dev"
+# Units rely on peculiarities of the "real" core utils
+checkdepends="py-coverage coreutils"
+subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/amoffat/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	python3 setup.py build
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	_py python2
+}
+
+_py3() {
+	_py python3
+}
+
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc (for $python)"
+	depends="$depends $python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+	cd "$builddir"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+check() {
+	cd "$builddir"
+	python2 setup.py test
+	python3 setup.py test
+}
+
+sha512sums="a20abed5c84430e413c885eb616e69c66b2f9487c49b483ef4f7af6af01954b5ca9da0e6bdf6d1fc0cf97efbc84721fafef0a1e0e2d0c39756a3d4ef2612f64a  sh-1.12.14.tar.gz"
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Oct 16 2018 - 16:03:31 UTC