archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-blosc / repos / community-x86_64 / PKGBUILD
blobe73f23245266313ad7f228fb6331ced56c2ab0ba
1 # Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
4 pkgname=python-blosc
5 pkgver=1.11.1
6 pkgrel=2
7 pkgdesc='Python wrapper for the extremely fast Blosc compression library'
8 arch=('x86_64')
9 url='http://python-blosc.blosc.org/'
10 license=('BSD')
11 depends=('python' 'blosc')
12 makedepends=('python-scikit-build' 'ninja')
13 checkdepends=('python-numpy' 'python-psutil')
14 optdepends=('python-numpy: for tests and benchmarks')
15 source=("https://github.com/Blosc/python-blosc/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 sha512sums=('21f8a697a3a902860a6ed72233984cf00c464ec0ddde9842a0c24b1e8e5ec4dd57b872096445a873d162d7529cba5c3666ba2a3ee3f9b1b18107d9636011281c')
17 b2sums=('cb348253a24258d2649ebc0604acbf936b8ccc2b28c42c69da2fee72ddf87eb17a24657bc5d3c0530193a60f482555ce4cc5d168a18d9c2d79a13410d40670bc')
19 build() {
20   cd "${pkgname}-${pkgver}"
22   export INCLUDE_SNAPPY=1 # Disabled by default for compatibility with non-C++ systems
23   python setup.py build \
24     --build-type none \
25     -DUSE_SYSTEM_BLOSC=ON \
26     -DCMAKE_C_FLAGS_INIT=-DNDEBUG
29 check() {
30   local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
31   local python_version_truncated=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
33   cd "${pkgname}-${pkgver}/_skbuild/linux-${CARCH}-${python_version}/setuptools/lib.linux-${CARCH}-cpython-${python_version_truncated}"
35   PYTHONPATH="${PWD}:$PYTHONPATH" python -m blosc.test
38 package() {
39   cd "${pkgname}-${pkgver}"
41   python setup.py --skip-cmake install --skip-build --root="${pkgdir}" --optimize=1
43   # license
44   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt