2023-02-02 18:25:31 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, isPy3k, pythonOlder, cython
|
2020-04-24 23:36:52 +00:00
|
|
|
, attrs, click, cligj, click-plugins, six, munch, enum34
|
2021-05-28 09:39:13 +00:00
|
|
|
, pytestCheckHook, boto3, mock, giflib, pytz
|
2021-09-18 10:52:07 +00:00
|
|
|
, gdal, certifi
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "fiona";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "Fiona";
|
|
|
|
inherit version;
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-bkh8v7pahJ+98G5FFp/X4fFmL0Tz1xerS5RgRrJFfq4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
cython
|
2021-05-28 09:39:13 +00:00
|
|
|
gdal # for gdal-config
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
gdal
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optionals stdenv.cc.isClang [ giflib ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
2021-04-05 15:23:46 +00:00
|
|
|
certifi
|
2020-04-24 23:36:52 +00:00
|
|
|
click
|
|
|
|
cligj
|
|
|
|
click-plugins
|
|
|
|
six
|
|
|
|
munch
|
2020-11-19 00:13:47 +00:00
|
|
|
pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optional (!isPy3k) enum34;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
boto3
|
|
|
|
] ++ lib.optional (pythonOlder "3.4") mock;
|
|
|
|
|
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-09-18 10:52:07 +00:00
|
|
|
# disable gdal deprecation warnings
|
|
|
|
export GDAL_ENABLE_DEPRECATED_DRIVER_GTM=YES
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Some tests access network, others test packaging
|
|
|
|
"http" "https" "wheel"
|
2022-11-27 09:42:12 +00:00
|
|
|
# https://github.com/Toblerity/Fiona/issues/1164
|
|
|
|
"test_no_append_driver_cannot_append"
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonImportsCheck = [ "fiona" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "OGR's neat, nimble, no-nonsense API for Python";
|
|
|
|
homepage = "https://fiona.readthedocs.io/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
|
|
|
};
|
|
|
|
}
|