Mail archive
alpine-aports

[alpine-aports] [PATCH 1/7] main/py-email-validator: new APKBUILD

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

---
 main/py-email-validator/APKBUILD | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 main/py-email-validator/APKBUILD
diff --git a/main/py-email-validator/APKBUILD b/main/py-email-validator/APKBUILD
new file mode 100644
index 0000000000..f31b583bc6
--- /dev/null
+++ b/main/py-email-validator/APKBUILD
_at_@ -0,0 +1,58 @@
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
+pkgname=py-email-validator
+_pkgname=python-email-validator
+pkgver=1.0.3
+pkgrel=0
+pkgdesc="A robust email syntax and deliverability validation library"
+url=https://github.com/JoshData/python-email-validator
+arch=noarch
+license="CC0-1.0"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+depends="py-dnspython py-idna"
+makedepends="py-setuptools"
+source="$pkgname-$pkgver.tar.gz::https://github.com/JoshData/$_pkgname/archive/v$pkgver.tar.gz"
+builddir=$srcdir/$_pkgname-$pkgver
+
+prepare() {
+	cp -r "$builddir" "$builddir"-py3
+}
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	cd "$builddir"-py3
+	python3 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python2 -c "import email_validator; email_validator.main()" \
+		--tests < test_pass.txt
+	cd "$builddir"-py3
+	python3 -c "import email_validator; email_validator.main()" \
+		--tests < test_pass.txt
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	cd "$builddir"
+	_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="1e816fdaa796aa92963f0fd90c8b6d111c6484a45416365095d08adc9243a7f8c6a90fb07df9b2e60c664f9b756252d6589baf137f5e0e60833d8759363fdc26  py-email-validator-1.0.3.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:22 UTC