mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
66 lines
1.8 KiB
Bash
66 lines
1.8 KiB
Bash
# $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')
|
|
pkgver=1.5.1
|
|
pkgrel=2
|
|
pkgdesc="A Python wrapper for the extremely fast Blosc compression library"
|
|
arch=('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')
|
|
md5sums=('36efec20fac80cb44b1f9c907a9d98c4'
|
|
'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
|
|
}
|
|
|