2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cython
|
|
|
|
, gdal
|
|
|
|
, setuptools
|
|
|
|
, attrs
|
|
|
|
, certifi
|
|
|
|
, click
|
|
|
|
, click-plugins
|
|
|
|
, cligj
|
|
|
|
, munch
|
|
|
|
, shapely
|
|
|
|
, boto3
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "fiona";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "1.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Toblerity";
|
|
|
|
repo = "Fiona";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-2CGLkgnpCAh9G+ILol5tmRj9S6/XeKk8eLzGEODiyP8=";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
cython
|
2021-05-28 09:39:13 +00:00
|
|
|
gdal # for gdal-config
|
2023-02-16 17:41:37 +00:00
|
|
|
setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
gdal
|
2023-02-16 17:41:37 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
2021-04-05 15:23:46 +00:00
|
|
|
certifi
|
2020-04-24 23:36:52 +00:00
|
|
|
click
|
|
|
|
cligj
|
|
|
|
click-plugins
|
|
|
|
munch
|
2023-02-16 17:41:37 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
calc = [ shapely ];
|
|
|
|
s3 = [ boto3 ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
pytestCheckHook
|
2023-02-16 17:41:37 +00:00
|
|
|
pytz
|
|
|
|
] ++ passthru.optional-dependencies.s3;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
rm -r fiona # prevent importing local fiona
|
|
|
|
'';
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Some tests access network, others test packaging
|
|
|
|
"http" "https" "wheel"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonImportsCheck = [ "fiona" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/Toblerity/Fiona/blob/${src.rev}/CHANGES.txt";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OGR's neat, nimble, no-nonsense API for Python";
|
|
|
|
homepage = "https://fiona.readthedocs.io/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
|
|
|
};
|
|
|
|
}
|