aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-email-validator
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2019-03-21 10:33:54 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2019-03-21 10:33:54 +0000
commita0a0a78372524ea00b463dcfe1cc8cc0d4953273 (patch)
treeb9e29c30f5af9076f248449869e5a9676bdf3043 /community/py-email-validator
parent4f9d421b63c04f44061610e9f529910551c2d355 (diff)
downloadaports-a0a0a78372524ea00b463dcfe1cc8cc0d4953273.tar.bz2
aports-a0a0a78372524ea00b463dcfe1cc8cc0d4953273.tar.xz
py various: move back to community due to py-sqlalchemy move
Diffstat (limited to 'community/py-email-validator')
-rw-r--r--community/py-email-validator/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/community/py-email-validator/APKBUILD b/community/py-email-validator/APKBUILD
new file mode 100644
index 0000000000..33213d71c4
--- /dev/null
+++ b/community/py-email-validator/APKBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Drew DeVault <sir@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 python2-dev python3-dev"
+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"