aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-certifi
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-10-01 18:15:39 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-10-01 18:42:55 +0200
commit02aab308049c4be35408eaca58b3b18dc2f01063 (patch)
treeeff9bc3fa5ac18b7fa62a8572470caf31ed54c7a /main/py-certifi
parentf790fc2297f9016acfd78fab86f6804393ad85ad (diff)
downloadaports-02aab308049c4be35408eaca58b3b18dc2f01063.tar.bz2
aports-02aab308049c4be35408eaca58b3b18dc2f01063.tar.xz
main/py-certifi: add py2/py3 subpackages
Diffstat (limited to 'main/py-certifi')
-rw-r--r--main/py-certifi/APKBUILD48
1 files changed, 28 insertions, 20 deletions
diff --git a/main/py-certifi/APKBUILD b/main/py-certifi/APKBUILD
index 31f66c0a2c..4c4d3b0654 100644
--- a/main/py-certifi/APKBUILD
+++ b/main/py-certifi/APKBUILD
@@ -7,32 +7,40 @@ pkgdesc="Python package for providing Mozilla's CA Bundle"
url="https://pypi.python.org/pypi/certifi"
arch="noarch"
license="ISC"
-depends="python"
-depends_dev="py-setuptools"
-makedepends="$depends_dev"
-install=""
-subpackages=""
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$_pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$_builddir"
- python setup.py build || return 1
+ cd "$builddir"
+
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _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"
}
md5sums="baa81e951a29958563689d868ef1064d certifi-2016.9.26.tar.gz"