diff options
author | prspkt <prspkt@protonmail.com> | 2018-05-19 19:06:24 +0000 |
---|---|---|
committer | Roberto Oliveira <robertoguimaraes8@gmail.com> | 2018-07-24 07:41:58 +0000 |
commit | 5a2707876c4c0f22a0f8ffcf70dfaee9b93926fa (patch) | |
tree | 904f4150dcb6c623a3ab7f3e1d138f687d902e7d /community/py-pathtools | |
parent | ee7d0929b9e5f48a1739e82797526682d7940a97 (diff) | |
download | aports-5a2707876c4c0f22a0f8ffcf70dfaee9b93926fa.tar.bz2 aports-5a2707876c4c0f22a0f8ffcf70dfaee9b93926fa.tar.xz |
community/py-pathtools: add python3
Diffstat (limited to 'community/py-pathtools')
-rw-r--r-- | community/py-pathtools/APKBUILD | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/community/py-pathtools/APKBUILD b/community/py-pathtools/APKBUILD index a5c6ed4026..42a756e7a9 100644 --- a/community/py-pathtools/APKBUILD +++ b/community/py-pathtools/APKBUILD @@ -3,24 +3,44 @@ pkgname=py-pathtools _pkgname=pathtools pkgver=0.1.2 -pkgrel=1 +pkgrel=2 pkgdesc="Path utilities for Python" url="https://github.com/gorakhargosh/pathtools" arch="noarch" license="MIT" depends="" -makedepends="py-setuptools python2-dev" +makedepends="py-setuptools python2-dev python3-dev" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" 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 + $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="9a1af5c605768ea5804b03b734ff0f82 py-pathtools-0.1.2.tar.gz" |