PKGBUILDs/community/python-blosc/PKGBUILD

67 lines
1.8 KiB
Bash
Raw Normal View History

2017-01-07 03:43:08 +00:00
# $Id$
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix build on AArch64
pkgbase=python-blosc
pkgname=('python2-blosc' 'python-blosc')
2017-04-10 18:01:21 +00:00
pkgver=1.5.1
2017-02-11 15:14:14 +00:00
pkgrel=1
2017-01-07 03:43:08 +00:00
pkgdesc="A Python wrapper for the extremely fast Blosc compression library"
arch=('i686' 'x86_64')
url="http://python-blosc.blosc.org/"
license=('MIT')
makedepends=('python-setuptools' 'python2-setuptools' 'blosc')
source=("https://github.com/Blosc/python-blosc/archive/v${pkgver}.tar.gz"
'python-blosc-alt-arch.patch')
2017-04-10 18:01:21 +00:00
md5sums=('36efec20fac80cb44b1f9c907a9d98c4'
2017-01-07 03:43:08 +00:00
'fabfde4dbf9e796ee620416ebd13b8da')
prepare() {
cd "$srcdir/${pkgbase}-${pkgver}"
patch -p1 -i ../python-blosc-alt-arch.patch
cd "$srcdir"
cp -a ${pkgbase}-${pkgver} ${pkgbase}-py2-${pkgver}
cd ${pkgbase}-py2-${pkgver}
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
msg "Building Python2"
cd "$srcdir"/${pkgbase}-py2-${pkgver}
python2 setup.py build_ext --inplace --blosc=/usr
python2 setup.py build
msg "Building Python3"
cd "$srcdir"/${pkgbase}-${pkgver}
python setup.py build_ext --inplace --blosc=/usr
python setup.py build
}
package_python2-blosc() {
depends=('python2' 'blosc')
cd "$srcdir"/${pkgbase}-py2-${pkgver}
python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
install -Dm644 LICENSES/PYTHON-BLOSC.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python-blosc() {
depends=('python' 'blosc')
cd "$srcdir"/${pkgbase}-${pkgver}
python setup.py install --skip-build --root="$pkgdir" --optimize=1
install -Dm644 LICENSES/PYTHON-BLOSC.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}