nixpkgs/pkgs/development/python-modules/fiona/default.nix

69 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, lib, buildPythonPackage, fetchPypi, isPy3k, pythonOlder
2019-02-25 09:51:42 +00:00
, attrs, click, cligj, click-plugins, six, munch, enum34
, pytestCheckHook, boto3, mock, giflib, pytz
, gdal, certifi
2017-09-03 09:05:57 +00:00
}:
buildPythonPackage rec {
pname = "fiona";
version = "1.8.20";
2017-09-03 09:05:57 +00:00
src = fetchPypi {
pname = "Fiona";
inherit version;
sha256 = "a70502d2857b82f749c09cb0dea3726787747933a2a1599b5ab787d74e3c143b";
2017-09-03 09:05:57 +00:00
};
CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11";
2019-02-25 09:51:42 +00:00
nativeBuildInputs = [
gdal # for gdal-config
2019-02-25 09:51:42 +00:00
];
2017-09-03 09:05:57 +00:00
buildInputs = [
gdal
] ++ lib.optionals stdenv.cc.isClang [ giflib ];
2017-09-03 09:05:57 +00:00
propagatedBuildInputs = [
2019-02-25 09:51:42 +00:00
attrs
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
six
munch
2020-11-05 23:46:50 +00:00
pytz
] ++ lib.optional (!isPy3k) enum34;
2017-09-03 09:05:57 +00:00
checkInputs = [
pytestCheckHook
2019-02-25 09:51:42 +00:00
boto3
] ++ lib.optional (pythonOlder "3.4") mock;
2017-09-03 09:05:57 +00:00
preCheck = ''
2019-02-25 09:51:42 +00:00
rm -r fiona # prevent importing local fiona
# disable gdal deprecation warnings
export GDAL_ENABLE_DEPRECATED_DRIVER_GTM=YES
2019-02-25 09:51:42 +00:00
'';
2017-09-03 09:05:57 +00:00
disabledTests = [
# Some tests access network, others test packaging
"http" "https" "wheel"
# Assert not true
"test_no_append_driver_cannot_append"
] ++ lib.optionals stdenv.isAarch64 [
# https://github.com/Toblerity/Fiona/issues/1012 the existence of this
# as a bug hasn't been challenged and other distributors seem to also
# be skipping these tests on aarch64, so this is not unique to nixpkgs.
"test_write_or_driver_error"
"test_append_or_driver_error"
];
meta = with lib; {
2017-09-03 09:05:57 +00:00
description = "OGR's neat, nimble, no-nonsense API for Python";
homepage = "https://fiona.readthedocs.io/";
2017-09-03 09:05:57 +00:00
license = licenses.bsd3;
maintainers = with maintainers; [ knedlsepp ];
};
}