diff options
author | Rich Li | 2019-10-18 11:13:43 -0700 |
---|---|---|
committer | Rich Li | 2019-10-18 11:13:43 -0700 |
commit | b7241cac0fb47402d5d2e9127124014f9179758b (patch) | |
tree | 9b872dbc5f3fb7a197393fdf2a8f5211e5d99507 | |
parent | fa0e18a7d3ecc6a43658a5bca903af58c71d52eb (diff) | |
download | aur-b7241cac0fb47402d5d2e9127124014f9179758b.tar.gz |
Fix tests for pytest 5
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | pytest-5.patch | 12 |
3 files changed, 27 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = python-h5netcdf pkgdesc = Pythonic interface to netCDF4 via h5py pkgver = 0.7.4 - pkgrel = 1 + pkgrel = 2 url = https://github.com/shoyer/h5netcdf arch = any license = BSD @@ -10,7 +10,9 @@ pkgbase = python-h5netcdf makedepends = python-setuptools depends = python-h5py source = python-h5netcdf-0.7.4.tar.gz::https://github.com/shoyer/h5netcdf/archive/v0.7.4.tar.gz + source = pytest-5.patch sha256sums = 9c53363f05e76a6913f259abb8013e7e6173b0e60af6455a2c1ea1750a1524e9 + sha256sums = e0cf10dc5faa80f5fb91f83b1a8fb434356ed187e13c554f553333c3e3e49406 pkgname = python-h5netcdf @@ -2,7 +2,7 @@ pkgname=python-h5netcdf pkgver=0.7.4 -pkgrel=1 +pkgrel=2 pkgdesc="Pythonic interface to netCDF4 via h5py" arch=('any') url="https://github.com/shoyer/h5netcdf" @@ -10,8 +10,17 @@ license=('BSD') depends=('python-h5py') makedepends=('python-setuptools') checkdepends=('python-netcdf4' 'python-pytest') -source=("$pkgname-$pkgver.tar.gz::https://github.com/shoyer/h5netcdf/archive/v${pkgver}.tar.gz") -sha256sums=('9c53363f05e76a6913f259abb8013e7e6173b0e60af6455a2c1ea1750a1524e9') +source=("$pkgname-$pkgver.tar.gz::https://github.com/shoyer/h5netcdf/archive/v${pkgver}.tar.gz" + "pytest-5.patch") +sha256sums=('9c53363f05e76a6913f259abb8013e7e6173b0e60af6455a2c1ea1750a1524e9' + 'e0cf10dc5faa80f5fb91f83b1a8fb434356ed187e13c554f553333c3e3e49406') + +prepare() { + cd "$srcdir/h5netcdf-${pkgver}" + # https://aur.archlinux.org/packages/python-h5netcdf/#comment-712212 + # https://github.com/shoyer/h5netcdf/issues/61 + patch --forward --strip=2 --input="${srcdir}/pytest-5.patch" +} build() { cd "$srcdir/h5netcdf-${pkgver}" diff --git a/pytest-5.patch b/pytest-5.patch new file mode 100644 index 000000000000..4cd8c7d2f5d3 --- /dev/null +++ b/pytest-5.patch @@ -0,0 +1,12 @@ +diff --unified --recursive --text src.orig/h5netcdf-0.7.4/h5netcdf/tests/test_h5netcdf.py src.new/h5netcdf-0.7.4/h5netcdf/tests/test_h5netcdf.py +--- src.orig/h5netcdf-0.7.4/h5netcdf/tests/test_h5netcdf.py 2019-10-18 11:05:48.979345571 -0700 ++++ src.new/h5netcdf-0.7.4/h5netcdf/tests/test_h5netcdf.py 2019-10-18 11:06:42.896526227 -0700 +@@ -36,7 +36,7 @@ + @pytest.fixture(params=['testfile.nc', 'hdf5://testfile']) + def tmp_local_or_remote_netcdf(request, tmpdir): + if request.param.startswith(remote_h5): +- if not pytest.config.option.restapi: ++ if not request.config.option.restapi: + pytest.skip('Do not test with HDF5 REST API') + elif without_h5pyd: + pytest.skip('h5pyd package not available') |