upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / python-h5py / trunk / PKGBUILD
blob4340a51fa198c36a193190777bde4c05155128a3
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Contributor: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Andrzej Giniewicz <gginiu@gmail.com>
4 # Contributor: Rich Li <rich@dranek.com>
5 # Contributor: Sebastien Binet <binet@lblbox>
7 _pkg=h5py
8 pkgname=python-${_pkg}
9 pkgver=3.8.0
10 pkgrel=4
11 pkgdesc="General-purpose Python bindings for the HDF5 library"
12 arch=(x86_64)
13 url="https://www.h5py.org/"
14 license=(BSD)
15 depends=(hdf5 liblzf python-numpy)
16 makedepends=(cython python-pkgconfig python-setuptools)
17 checkdepends=(python-pytest python-pytest-mpi python-pytables)
18 conflicts=(hdf5-openmpi)
19 source=(https://files.pythonhosted.org/packages/source/h/${_pkg}/${_pkg}-${pkgver}.tar.gz)
20 sha256sums=('6fead82f0c4000cf38d53f9c030780d81bfa0220218aee13b90b7701c937d95f')
21 validpgpkeys=(AC47F71DB275ECD0B3DA46E857FA4540DD4EFCF7  # Thomas A Caswell (Brookhaven National Lab) <tcaswell@bnl.gov>
22               96B7334D7610EE3E68AFFE589E027116943D6A8B) # Thomas A Caswell <tcaswell@bnl.gov> (new key)
23 # See https://github.com/h5py/h5py/issues/1299 about lack of GPG sigs for recent releases
25 prepare() {
26   cd ${_pkg}-${pkgver}
27   # Allow our numpy version
28   sed -i 's/numpy ==/numpy >=/g' setup.py
29   # Remove RPATH
30   sed -i "s/settings\\['runtime_library_dirs'\\] = settings\\['library_dirs'\\]/pass/" setup_build.py
33 build() {
34   cd ${_pkg}-${pkgver}
35   H5PY_SYSTEM_LZF=1 python setup.py build
38 check() {
39   local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
40   export H5PY_TEST_CHECK_FILTERS=1
41   PYTHONPATH="${PWD}/${_pkg}-${pkgver}/build/lib.linux-${CARCH}-cpython-${python_version/./}" python -m pytest --pyargs h5py -rxXs --color=yes
44 package() {
45   cd ${_pkg}-${pkgver}
46   python setup.py install --root="${pkgdir}" --skip-build --optimize=1
47   install -Dm644 licenses/license.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}/