Mail archive
alpine-aports

[alpine-aports] [PATCH 2/3] New aport: testing/py-dotenv

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

Get and set values in your .env file in local and production servers
https://github.com/theskumar/python-dotenv
---
 testing/py-dotenv/APKBUILD | 52 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 testing/py-dotenv/APKBUILD
diff --git a/testing/py-dotenv/APKBUILD b/testing/py-dotenv/APKBUILD
new file mode 100644
index 0000000000..5d03271311
--- /dev/null
+++ b/testing/py-dotenv/APKBUILD
_at_@ -0,0 +1,52 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
+pkgname=py-dotenv
+_pkgname="python-${pkgname#py-}"
+pkgver=0.9.1
+pkgrel=0
+pkgdesc="Get and set values in your .env file in local and production servers"
+url="https://github.com/theskumar/python-dotenv"
+arch="noarch"
+license="BSD-3-Clause"
+makedepends="py-setuptools python2-dev python3-dev"
+checkdepends="pytest py-sh ipython"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/theskumar/$_pkgname/archive/v$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 test requires ipython version for Python2, which is not packed
+	# yet. The motivation to package it for an obsolete version of Python is not
+	# big enough.
+	python3 setup.py test
+}
+
+sha512sums="11f5f3f07b7673d2c78cb0d73594a640789b0cb973c0b5326a317cd4e8cec062f1d2a513b9acd119679d64b9ed6c6812715c23766e41a0f8b40721bfce1aacda  python-dotenv-0.9.1.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:32 UTC