diff options
author | Ivan Tham <pickfire@riseup.net> | 2017-02-25 16:09:42 +0800 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-02-26 21:37:26 +0000 |
commit | 9c8ca8fa6919386379f4aad5dfa7f250ab3116fb (patch) | |
tree | e89868a5f0bf48d2a1081267a78fb37980a213bd /main/py-httplib2 | |
parent | 58a163a310bc1279c900a4c431ef27952cd00ea7 (diff) | |
download | aports-9c8ca8fa6919386379f4aad5dfa7f250ab3116fb.tar.bz2 aports-9c8ca8fa6919386379f4aad5dfa7f250ab3116fb.tar.xz |
main/py-httplib2: add py3 subpackages
Diffstat (limited to 'main/py-httplib2')
-rw-r--r-- | main/py-httplib2/APKBUILD | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/main/py-httplib2/APKBUILD b/main/py-httplib2/APKBUILD index aca222171b..2ff97d54d7 100644 --- a/main/py-httplib2/APKBUILD +++ b/main/py-httplib2/APKBUILD @@ -5,30 +5,41 @@ _pkgname=httplib2 pkgver=0.10.3 pkgrel=0 pkgdesc="A Python HTTP client library" -url="https://github.com/jcgregorio/httplib2" +url="https://github.com/httplib2/httplib2" arch="noarch" license="MIT" -depends="python2" -makedepends="python2-dev py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${_pkgname}:_py2 py3-${_pkgname}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" -prepare() { - default_prepare || return 1 - - cd "$builddir" - chmod 644 python2/${_pkgname}.egg-info/* -} - build() { cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { + 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" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 - chmod o+r $pkgdir/usr/lib/python2.7/site-packages/httplib2/cacerts.txt + $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="d024986ffd577858017d7a8cfcae98a6cd04b8c89634ea302df4c1443eb2381cecca6ffbb631c9d4260335a3462df6d5604ec485aa591a05cb0231a3f6745aaa httplib2-0.10.3.tar.gz" |