Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / fiona / default.nix
blob42f1a410624caa075e2de073c49ab6b47e7b07de
1 { stdenv, lib, buildPythonPackage, fetchPypi, isPy3k, pythonOlder
2 , attrs, click, cligj, click-plugins, six, munch, enum34
3 , pytest, boto3, mock, giflib, pytz
4 , gdal_2 # can't bump to 3 yet, https://github.com/Toblerity/Fiona/issues/745
5 , certifi
6 }:
8 buildPythonPackage rec {
9   pname = "Fiona";
10   version = "1.8.18";
12   src = fetchPypi {
13     inherit pname version;
14     sha256 = "b732ece0ff8886a29c439723a3e1fc382718804bb057519d537a81308854967a";
15   };
17   CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11";
19   nativeBuildInputs = [
20     gdal_2 # for gdal-config
21   ];
23   buildInputs = [
24     gdal_2
25   ] ++ lib.optionals stdenv.cc.isClang [ giflib ];
27   propagatedBuildInputs = [
28     attrs
29     certifi
30     click
31     cligj
32     click-plugins
33     six
34     munch
35     pytz
36   ] ++ lib.optional (!isPy3k) enum34;
38   checkInputs = [
39     pytest
40     boto3
41   ] ++ lib.optional (pythonOlder "3.4") mock;
43   checkPhase = ''
44     rm -r fiona # prevent importing local fiona
45     # Some tests access network, others test packaging
46     pytest -k "not (http or https or wheel)"
47   '';
49   meta = with lib; {
50     description = "OGR's neat, nimble, no-nonsense API for Python";
51     homepage = "https://fiona.readthedocs.io/";
52     license = licenses.bsd3;
53     maintainers = with maintainers; [ knedlsepp ];
54   };