Mail archive
alpine-aports

[alpine-aports] [PATCH v3 03/10] main/py-freezegun: new APKBUILD

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

---
 main/py-freezegun/APKBUILD | 65 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 main/py-freezegun/APKBUILD
diff --git a/main/py-freezegun/APKBUILD b/main/py-freezegun/APKBUILD
new file mode 100644
index 0000000000..6e5c304e53
--- /dev/null
+++ b/main/py-freezegun/APKBUILD
_at_@ -0,0 +1,65 @@
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
+pkgname=py-freezegun
+_pyname=freezegun
+pkgver=0.3.11
+pkgrel=0
+pkgdesc="Let your Python tests travel through time"
+url="https://github.com/spulec/freezegun"
+arch="noarch"
+license="Apache-2.0"
+_py2_deps="py2-six py2-dateutil"
+_py3_deps="py3-six py3-dateutil"
+makedepends="
+	$_py2_deps $_py3_deps python2-dev python3-dev py2-setuptools py3-setuptools
+"
+checkdepends="
+	pytest py3-pytest py2-mock py3-mock py2-nose py3-nose
+"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+_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"
+	pytest-3
+	cd "$builddir"-py2
+	pytest-2
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	depends="$_py2_deps"
+	cd "$builddir"-py2
+	_py python2
+}
+
+_py3() {
+	depends="$_py3_deps"
+	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="e8b392176641d52f6ed795c9af5fbc0a62892aeedf32b42375b56ab44a9ad7a5ecd3bb81363ed0ae65204aff2ef894cd7f2e17f42be72f31d3409b2bffa59ab8  freezegun-0.3.11.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:16:35 UTC