Mail archive
alpine-aports

[alpine-aports] [PATCH 02/12] testing/py-serpent: new APKBUILD

From: Drew DeVault <sir_at_cmpwn.com>
Date: Wed, 3 Apr 2019 16:27:05 -0400

---
 testing/py-serpent/APKBUILD | 57 +++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 testing/py-serpent/APKBUILD
diff --git a/testing/py-serpent/APKBUILD b/testing/py-serpent/APKBUILD
new file mode 100644
index 0000000000..75992f8012
--- /dev/null
+++ b/testing/py-serpent/APKBUILD
_at_@ -0,0 +1,57 @@
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
+pkgname=py-serpent
+_pyname=serpent
+pkgver=1.28
+pkgrel=0
+pkgdesc="Serialization based on ast.literal_eval for Python"
+url="https://pypi.org/project/serpent/"
+arch="noarch"
+license="MIT"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+makedepends="python2 python3 py2-setuptools py3-setuptools"
+checkdepends="py2-attrs py3-attrs py2-tz py3-tz"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir=$srcdir/$_pyname-$pkgver
+
+prepare() {
+	cp -r "$builddir" "$builddir"-py2
+}
+
+build() {
+	cd "$builddir"
+	python3 setup.py build
+	cd "$builddir"-py2
+	python2 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python3 setup.py test
+	cd "$builddir"-py2
+	python2 setup.py test
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	cd "$builddir"-py2
+	_py python2
+}
+
+_py3() {
+	cd "$builddir"
+	_py python3
+}
+
+_py() {
+	_python="$1"
+	pkgdesc="$pkgdesc (for $_python)"
+	depends="$depends $_python"
+	install_if="$pkgname=$pkgver-r$pkgrel $_python"
+	$_python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="776bc497c7cd815c4ef44107bdf53b62bb92229beba0be7efceb9fba57dc7c677bf09832db335485df3e466acdffe6ebf4b3636ae9b49e60075379a7419a29ad  serpent-1.28.tar.gz"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Apr 03 2019 - 16:27:05 UTC