[alpine-aports] testing/py-recis_i18n: new aport

Message ID 20190709063246.28883-1-opal@wowana.me
State New
Headers show
Series
  • [alpine-aports] testing/py-recis_i18n: new aport
Related show

Commit Message

opal hart July 9, 2019, 6:32 a.m. UTC
---
 testing/py-precis_i18n/APKBUILD | 49 +++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 testing/py-precis_i18n/APKBUILD

Comments

maxice8 July 9, 2019, 10:07 a.m. UTC | #1
Is the py2 package really required ? python2 is going to be EOL soon

> +pkgdesc="Python3 implementation of PRECIS framework (RFC 8264, RFC 8265, RFC 8266)"

pkgdesc explicitly mentions python3 but package is py2/py3 split



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

Patch

diff --git a/testing/py-precis_i18n/APKBUILD b/testing/py-precis_i18n/APKBUILD
new file mode 100644
index 0000000000..d249dcc294
--- /dev/null
+++ b/testing/py-precis_i18n/APKBUILD
@@ -0,0 +1,49 @@ 
+# Maintainer: opal hart <opal@wowana.me>
+pkgname=py-precis_i18n
+_pkgname="${pkgname#py-}"
+pkgver=1.0
+pkgrel=0
+pkgdesc="Python3 implementation of PRECIS framework (RFC 8264, RFC 8265, RFC 8266)"
+url="https://github.com/byllyfish/precis_i18n"
+arch="noarch"
+license="GPL-3.0-only"
+makedepends="py-setuptools"
+subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/byllyfish/precis_i18n/archive/v$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	python3 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python2 setup.py check
+	python3 setup.py check
+}
+
+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"
+}
+
+sha512sums="b43622458fefb051e6f5ae6e347abfa65195052c63290b2be3ffb7c05eae0300caee53713d7216ee36c4ef0508cc4828e4d7ed3c65df873a684b803cc19bd410  precis_i18n-1.0.tar.gz"