iosevka: 32.4.0 -> 32.5.0 (#378549)
[NixPkgs.git] / pkgs / development / python-modules / fiona / default.nix
blobcf60fd2f39caa2daeeb6d07f0be630a67ec3aac6
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   cython,
8   gdal,
9   setuptools,
11   # dependencies
12   attrs,
13   certifi,
14   click,
15   click-plugins,
16   cligj,
18   # optional-dependencies
19   pyparsing,
20   shapely,
21   boto3,
23   # tests
24   fsspec,
25   pytestCheckHook,
26   pytz,
27   snuggs,
30 buildPythonPackage rec {
31   pname = "fiona";
32   version = "1.10.1";
33   pyproject = true;
35   src = fetchFromGitHub {
36     owner = "Toblerity";
37     repo = "Fiona";
38     tag = version;
39     hash = "sha256-5NN6PBh+6HS9OCc9eC2TcBvkcwtI4DV8qXnz4tlaMXc=";
40   };
42   build-system = [
43     cython
44     gdal # for gdal-config
45     setuptools
46   ];
48   buildInputs = [ gdal ];
50   dependencies = [
51     attrs
52     certifi
53     click
54     click-plugins
55     cligj
56   ];
58   optional-dependencies = {
59     calc = [
60       pyparsing
61       shapely
62     ];
63     s3 = [ boto3 ];
64   };
66   nativeCheckInputs = [
67     fsspec
68     pytestCheckHook
69     pytz
70     shapely
71     snuggs
72   ] ++ optional-dependencies.s3;
74   preCheck = ''
75     rm -r fiona # prevent importing local fiona
76   '';
78   pytestFlagsArray = [
79     # Tests with gdal marker do not test the functionality of Fiona,
80     # but they are used to check GDAL driver capabilities.
81     "-m 'not gdal'"
82   ];
84   disabledTests = [
85     # Some tests access network, others test packaging
86     "http"
87     "https"
88     "wheel"
90     # see: https://github.com/Toblerity/Fiona/issues/1273
91     "test_append_memoryfile_drivers"
92   ];
94   pythonImportsCheck = [ "fiona" ];
96   doInstallCheck = true;
98   meta = {
99     changelog = "https://github.com/Toblerity/Fiona/blob/${src.rev}/CHANGES.txt";
100     description = "OGR's neat, nimble, no-nonsense API for Python";
101     mainProgram = "fio";
102     homepage = "https://fiona.readthedocs.io/";
103     license = lib.licenses.bsd3;
104     maintainers = lib.teams.geospatial.members;
105   };