diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-27 12:21:03 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-27 13:14:32 +0000 |
commit | 4fd69a444cb1f66113d08df14e6073cf6feaec2e (patch) | |
tree | 18fc696ecb1ac85e70035ebf41f6d89f30cf6bc3 /community/py-cffi | |
parent | 393d334352e747733b188365f1954a1a99a6b020 (diff) | |
download | aports-4fd69a444cb1f66113d08df14e6073cf6feaec2e.tar.bz2 aports-4fd69a444cb1f66113d08df14e6073cf6feaec2e.tar.xz |
community/py-cffi: upgrade to 1.7.0. Improved APKBUILD, added python3 subpackage
Diffstat (limited to 'community/py-cffi')
-rw-r--r-- | community/py-cffi/APKBUILD | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/community/py-cffi/APKBUILD b/community/py-cffi/APKBUILD index 89934f547e..3f28cddab7 100644 --- a/community/py-cffi/APKBUILD +++ b/community/py-cffi/APKBUILD @@ -2,40 +2,50 @@ # Maintainer: William Pitcock <nenolod@dereferenced.org> pkgname=py-cffi _pkgname=cffi -pkgver=1.4.2 +pkgver=1.7.0 pkgrel=0 pkgdesc="A foreign function interface for calling C code from python" url="http://cffi.readthedocs.org/" -arch="all" +arch="noarch" license="MIT" -depends="python py-cparser" -depends_dev="" -makedepends="python-dev py-setuptools libffi-dev" +depends="" +makedepends="python-dev python3-dev py-setuptools libffi-dev" install="" -subpackages="" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" - python setup.py build || return 1 + cd "$builddir" + python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + arch="all" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + depends="py2-cparser" + replaces="$pkgname" +} + +_py3() { + _py python3 + depends="py3-cparser" } -md5sums="81357fe5042d00650b85b728cc181df2 cffi-1.4.2.tar.gz" -sha256sums="8f1d177d364ea35900415ae24ca3e471be3d5334ed0419294068c49f45913998 cffi-1.4.2.tar.gz" -sha512sums="cdb265c4ae390b6498fab34a2f0920ee6eca65e6b543dfb92a0e64825bcef26e8bd4c9f1f43a15e7696128f38026e467fcdda057e00e939311a465b2b585fc34 cffi-1.4.2.tar.gz" +md5sums="34122a545060cee58bab88feab57006d cffi-1.7.0.tar.gz" +sha256sums="6ed5dd6afd8361f34819c68aaebf9e8fc12b5a5893f91f50c9e50c8886bb60df cffi-1.7.0.tar.gz" +sha512sums="ce9439a219248b06a6f2d019324f4150576b5e4d853025d61d470105f95af2a6c2387080bfd0308c063ad756f34feead9a5958187d626524594dfe9a3adf7462 cffi-1.7.0.tar.gz" |