Commit 380daa93 authored by Holger Jaekel's avatar Holger Jaekel Committed by Leo

testing/py3-rasterio: new aport

https://pypi.python.org/pypi/rasterio
Fast and direct raster I/O for use with Numpy and SciPy
parent 24085bf8
Author: Holger Jaekel <holger.jaekel@gmx.de>
Summary: use language level 3 for cython
----
--- a/setup.py
+++ b/setup.py
@@ -304,7 +304,7 @@ if os.path.exists("MANIFEST.in") and "cl
'rasterio.shutil', ['rasterio/shutil.pyx'], **ext_options),
Extension(
'rasterio._transform', ['rasterio/_transform.pyx'], **ext_options)],
- quiet=True, **cythonize_options)
+ quiet=True, compiler_directives={'language_level' : "2"}, **cythonize_options)
# If there's no manifest template, as in an sdist, we just specify .c files.
else:
Author: Holger Jaekel <holger.jaekel@gmx.de>
Summary: GDAL does not read HDF5
----
--- a/tests/test_read.py
+++ b/tests/test_read.py
@@ -259,14 +259,6 @@ class ReaderContextTest(unittest.TestCas
self.assertEqual(a.shape, (1, 2, 2))
self.assertTrue(hasattr(a, 'mask'))
- @pytest.mark.skipif(not has_hdf, reason="HDF driver not available")
- def test_read_no_band(self):
- with rasterio.open('tests/data/no_band.h5') as s:
- self.assertEqual(s.count, 0)
- self.assertEqual(s.meta['dtype'], 'float_')
- self.assertIsNone(s.meta['nodata'])
- self.assertRaises(ValueError, s.read)
-
@pytest.mark.parametrize("shape,indexes", [
((72, 80), 1), # Single band
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
_pkgname=rasterio
pkgname=py3-$_pkgname
pkgver=1.1.1
pkgrel=0
pkgdesc="Fast and direct raster I/O for use with Numpy and SciPy"
url="https://pypi.python.org/pypi/rasterio"
arch="all !s390x !x86 !armhf !armv7"
license="BSD-3-Clause"
depends="
py3-affine
py3-attrs
py3-boto3
py3-click
py3-click-plugins
py3-cligj
py3-matplotlib
py3-numpy
py3-snuggs
"
makedepends="
cython
gdal-dev
py3-numpy-dev
python3-dev
"
checkdepends="
pytest
py3-hypothesis
py3-sphinx
"
source="
rasterio-$pkgver.tar.gz::https://github.com/mapbox/rasterio/archive/$pkgver.tar.gz
10-cython.patch
20-gdal.patch
"
builddir="$srcdir/rasterio-$pkgver"
build() {
python3 setup.py build
}
check() {
python3 setup.py test
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=2
}
sha512sums="7ec4fd625dadd2e707782d77bfe6a319194c9a20742a15493636cd611b8039d07193390e1b9bc2c0dc9ece54f8b9a7d8a80c4df318621b35ed1d4b30bfc36d3f rasterio-1.1.1.tar.gz
6b1ddb4b5454349be4bfe57a3087571ff3d1540f2e6e57f7f2242594b918c428add199af0212d8a76b052c4a6104880ff51a2ddd7e66b768b2dcfb1e49083cb5 10-cython.patch
5cbde5b15e8a82d9dc8bfc48b5cd07ccc4ff6a0b8bb723b0edec27a8dbafed4fc0f14585aa06a77ec88faad924ca8786001d8b0dd3d5b83774674424e1f7eaac 20-gdal.patch"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment