1{ stdenv, buildPythonPackage, fetchPypi, isPy3k
2, attrs, click, cligj, click-plugins, six, munch, enum34
3, pytest, boto3
4, gdal
5}:
6
7buildPythonPackage rec {
8 pname = "Fiona";
9 version = "1.8.4";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "aec9ab2e3513c9503ec123b1a8573bee55fc6a66e2ac07088c3376bf6738a424";
14 };
15
16 CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11";
17
18 nativeBuildInputs = [
19 gdal # for gdal-config
20 ];
21
22 buildInputs = [
23 gdal
24 ];
25
26 propagatedBuildInputs = [
27 attrs
28 click
29 cligj
30 click-plugins
31 six
32 munch
33 ] ++ stdenv.lib.optional (!isPy3k) enum34;
34
35 checkInputs = [
36 pytest
37 boto3
38 ];
39
40 checkPhase = ''
41 rm -r fiona # prevent importing local fiona
42 # Some tests access network, others test packaging
43 pytest -k "not test_*_http \
44 and not test_*_https \
45 and not test_*_wheel"
46 '';
47
48 meta = with stdenv.lib; {
49 description = "OGR's neat, nimble, no-nonsense API for Python";
50 homepage = http://toblerity.org/fiona/;
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ knedlsepp ];
53 };
54}