2023-02-11 06:46:14 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cython
|
|
|
|
, gdal
|
|
|
|
, setuptools
|
|
|
|
, attrs
|
|
|
|
, certifi
|
|
|
|
, click
|
|
|
|
, click-plugins
|
|
|
|
, cligj
|
|
|
|
, munch
|
|
|
|
, shapely
|
|
|
|
, boto3
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytz
|
2017-09-03 09:05:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-08-31 20:03:12 +00:00
|
|
|
pname = "fiona";
|
2023-02-11 06:46:14 +00:00
|
|
|
version = "1.9.1";
|
2017-09-03 09:05:57 +00:00
|
|
|
|
2023-02-11 06:46:14 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2017-09-03 09:05:57 +00:00
|
|
|
|
2023-02-11 06:46:14 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Toblerity";
|
|
|
|
repo = "Fiona";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-2CGLkgnpCAh9G+ILol5tmRj9S6/XeKk8eLzGEODiyP8=";
|
|
|
|
};
|
2018-09-09 20:40:49 +00:00
|
|
|
|
2019-02-25 09:51:42 +00:00
|
|
|
nativeBuildInputs = [
|
2023-02-01 11:36:07 +00:00
|
|
|
cython
|
2021-05-25 11:54:03 +00:00
|
|
|
gdal # for gdal-config
|
2023-02-11 06:46:14 +00:00
|
|
|
setuptools
|
2019-02-25 09:51:42 +00:00
|
|
|
];
|
|
|
|
|
2017-09-03 09:05:57 +00:00
|
|
|
buildInputs = [
|
2021-05-25 11:54:03 +00:00
|
|
|
gdal
|
2023-02-11 06:46:14 +00:00
|
|
|
];
|
2017-09-03 09:05:57 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2019-02-25 09:51:42 +00:00
|
|
|
attrs
|
2021-04-04 19:26:07 +00:00
|
|
|
certifi
|
2019-02-25 09:51:42 +00:00
|
|
|
click
|
2017-09-03 09:05:57 +00:00
|
|
|
cligj
|
|
|
|
click-plugins
|
2019-02-25 09:51:42 +00:00
|
|
|
munch
|
2023-02-11 06:46:14 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
calc = [ shapely ];
|
|
|
|
s3 = [ boto3 ];
|
|
|
|
};
|
2017-09-03 09:05:57 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-25 11:54:03 +00:00
|
|
|
pytestCheckHook
|
2023-02-11 06:46:14 +00:00
|
|
|
pytz
|
|
|
|
] ++ passthru.optional-dependencies.s3;
|
2017-09-03 09:05:57 +00:00
|
|
|
|
2021-05-25 11:54:03 +00:00
|
|
|
preCheck = ''
|
2019-02-25 09:51:42 +00:00
|
|
|
rm -r fiona # prevent importing local fiona
|
|
|
|
'';
|
2017-09-03 09:05:57 +00:00
|
|
|
|
2021-05-25 11:54:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Some tests access network, others test packaging
|
|
|
|
"http" "https" "wheel"
|
|
|
|
];
|
|
|
|
|
2023-02-01 11:36:07 +00:00
|
|
|
pythonImportsCheck = [ "fiona" ];
|
|
|
|
|
2019-10-08 01:29:53 +00:00
|
|
|
meta = with lib; {
|
2023-02-11 06:46:14 +00:00
|
|
|
changelog = "https://github.com/Toblerity/Fiona/blob/${src.rev}/CHANGES.txt";
|
2017-09-03 09:05:57 +00:00
|
|
|
description = "OGR's neat, nimble, no-nonsense API for Python";
|
2019-12-08 16:50:31 +00:00
|
|
|
homepage = "https://fiona.readthedocs.io/";
|
2017-09-03 09:05:57 +00:00
|
|
|
license = licenses.bsd3;
|
2023-06-19 14:19:41 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2017-09-03 09:05:57 +00:00
|
|
|
};
|
|
|
|
}
|