diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 19:24:02 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-11-24 14:46:02 +0100 |
commit | fa574a113dad8aff809b7a13c90b8d51965665b5 (patch) | |
tree | 7d74e466f9741f35058dde71dada74a6871c2820 /testing/py-netifaces | |
parent | 60a011a1ddaffe15a7545de38c04b74351e2ef7c (diff) | |
download | aports-fa574a113dad8aff809b7a13c90b8d51965665b5.tar.bz2 aports-fa574a113dad8aff809b7a13c90b8d51965665b5.tar.xz |
testing/py-netifaces: enable py3
Diffstat (limited to 'testing/py-netifaces')
-rw-r--r-- | testing/py-netifaces/APKBUILD | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/testing/py-netifaces/APKBUILD b/testing/py-netifaces/APKBUILD index 66ba291c85..073db94ca0 100644 --- a/testing/py-netifaces/APKBUILD +++ b/testing/py-netifaces/APKBUILD @@ -3,22 +3,19 @@ pkgname=py-netifaces _pkgname=netifaces pkgver=0.10.5 -pkgrel=0 +pkgrel=1 pkgdesc="Portable module to access network interface information in Python" url="http://alastairs-place.net/netifaces/" arch="all" license="MIT" -depends="" -depends_dev="" -makedepends="python2-dev py-setuptools linux-headers" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools linux-headers" +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 -_builddir="$srcdir"/$_pkgname-$pkgver prepare() { local i - cd "$_builddir" + cd "$builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; @@ -27,13 +24,32 @@ prepare() { } build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || 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="5b4d1f1310ed279e6df27ef3a9b71519 netifaces-0.10.5.tar.gz" |