diff options
-rw-r--r-- | community/py3-pathtools/APKBUILD (renamed from community/py-pathtools/APKBUILD) | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/community/py-pathtools/APKBUILD b/community/py3-pathtools/APKBUILD index 0e5c7546a6..31e07a3957 100644 --- a/community/py-pathtools/APKBUILD +++ b/community/py3-pathtools/APKBUILD @@ -1,46 +1,33 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> -pkgname=py-pathtools +pkgname=py3-pathtools _pkgname=pathtools pkgver=0.1.2 -pkgrel=4 +pkgrel=5 pkgdesc="Path utilities" url="https://github.com/gorakhargosh/pathtools" arch="noarch" license="MIT" -depends="" -makedepends="py-setuptools python2-dev python3-dev" -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +depends="python3" +makedepends="py3-setuptools" source="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 - python3 setup.py build -} - -package() { - mkdir -p "$pkgdir" -} +replaces=py-pathtools # Backwards compatibility +provides=py-pathtools=$pkgver-r$pkgrel # Backwards compatibility -_py2() { - replaces="$pkgname" - _py python2 +prepare() { + default_prepare + # remove interpreter line from libraries + sed -i '/#!\//d' pathtools/*.py } -_py3() { - _py python3 +build() { + python3 setup.py build } -_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" +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" } sha512sums="e014cb17f3d61ce7979e36663f94a44d4f1116c35e3d2ec8c4ac207a81935dde246495ed06597e6edade1509f384b9e5729a97ffd3eec31b1d1c4a8372d1dfd7 pathtools-0.1.2.tar.gz" |