Mail archive
alpine-aports

[alpine-aports] [PATCH 4/7] main/py-faker: new APKBUILD

From: Drew DeVault <sir_at_cmpwn.com>
Date: Wed, 6 Mar 2019 14:01:25 -0700

---
 main/py-faker/APKBUILD | 64 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 main/py-faker/APKBUILD
diff --git a/main/py-faker/APKBUILD b/main/py-faker/APKBUILD
new file mode 100644
index 0000000000..51bff43b97
--- /dev/null
+++ b/main/py-faker/APKBUILD
_at_@ -0,0 +1,64 @@
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
+pkgname=py-faker
+_pkgname=Faker
+pkgver=1.0.2
+pkgrel=0
+pkgdesc="Python package that generates fake data for you"
+url=https://faker.readthedocs.io/en/master/
+arch=noarch
+license=MIT
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+depends="py-dateutil py-six py-text-unidecode"
+makedepends="py-setuptools"
+checkdepends="
+	py-email-validator py-ukpostcodeparser py-mock pytest py-more-itertools
+	py2-ipaddress
+"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir=$srcdir/$_pkgname-$pkgver
+
+prepare() {
+	cd "$builddir"
+	# They erroneously require a specific version of pytest
+	sed -i setup.py -e 's/ *"pytest>=.*//g'
+	cp -r "$builddir" "$builddir"-py3
+}
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	cd "$builddir"-py3
+	python3 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python2 setup.py test
+	cd "$builddir"-py3
+	python3 setup.py test
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	cd "$builddir"
+	depends="$depends py2-ipaddress"
+	_py python2
+}
+
+_py3() {
+	cd "$builddir"-py3
+	_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="cd484d2ce244fab0d47b2b4fe541f050f2400d2a8291589ed5ace4a664ecc264294e7f994fb4a12e5f082ac67f1c3bc2f6090fcea5f57cbc7469dfe7195a99b7  Faker-1.0.2.tar.gz"
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Mar 06 2019 - 14:01:25 UTC