diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-25 11:50:45 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-25 11:50:49 +0000 |
commit | c218f3c6b60cb2d0e0287482e69b7d71e3c11a1e (patch) | |
tree | 6fd8cd16c2d89339a042cc886896a66205ed6ba0 /testing | |
parent | 47bd77c5ca01255b3cdb3700a4d5211e8937e483 (diff) | |
download | aports-c218f3c6b60cb2d0e0287482e69b7d71e3c11a1e.tar.bz2 aports-c218f3c6b60cb2d0e0287482e69b7d71e3c11a1e.tar.xz |
testing/py-pefile: added support for python3. Created subpackages for py2 and py3
Diffstat (limited to 'testing')
-rw-r--r-- | testing/py-pefile/APKBUILD | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/testing/py-pefile/APKBUILD b/testing/py-pefile/APKBUILD index 96c99a0da7..c40d487f80 100644 --- a/testing/py-pefile/APKBUILD +++ b/testing/py-pefile/APKBUILD @@ -3,29 +3,52 @@ pkgname=py-pefile _pkgname=pefile pkgver=2016.3.28 -pkgrel=0 +pkgrel=1 pkgdesc="Python PE parsing module" url="https://github.com/erocarrera/pefile" arch="noarch" license="MIT" -depends="py-future" -makedepends="python-dev py-setuptools" +depends="py3-future" +makedepends="python-dev python3-dev py-setuptools" install="" -subpackages="" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="https://github.com/erocarrera/$_pkgname/files/192316/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python setup.py build || return 1 + python3 setup.py build || return 1 } package() { cd "$builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + python setup.py install --root=$pkgdir/ --optimize=1 || return 1 + python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1 install -Dm0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE } +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))') + + mkdir -p "$subpkgdir"${dir} + mv "$pkgdir"${dir}/* "$subpkgdir"${dir} +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + + + md5sums="2f3259fa2b5cf48a3fdc5422a58f854f pefile-2016.3.28.tar.gz" sha256sums="f24021085b5c3ef7b0898bb1f1d93eecd3839e03512769e22b0c5a10d9095f7b pefile-2016.3.28.tar.gz" sha512sums="f27918634507fd839b3bc71677b57676f1b2e46c43970dba158b1b4cb4202344de41fef53fffd294dd70f89b1a52aec0124e835a410ff7f0bec9b11ece425201 pefile-2016.3.28.tar.gz" |