nixpkgs/pkgs/development/python-modules/fiona/default.nix
2021-05-25 13:54:03 +02:00

59 lines
1.2 KiB
Nix

{ stdenv, lib, buildPythonPackage, fetchPypi, isPy3k, pythonOlder
, attrs, click, cligj, click-plugins, six, munch, enum34
, pytestCheckHook, boto3, mock, giflib, pytz
, gdal
, certifi
}:
buildPythonPackage rec {
pname = "Fiona";
version = "1.8.19";
src = fetchPypi {
inherit pname version;
sha256 = "b9059e0b29c2e9e6b817e53f941e77e1aca7075f986005d38db307067b60458f";
};
CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11";
nativeBuildInputs = [
gdal # for gdal-config
];
buildInputs = [
gdal
] ++ lib.optionals stdenv.cc.isClang [ giflib ];
propagatedBuildInputs = [
attrs
certifi
click
cligj
click-plugins
six
munch
pytz
] ++ lib.optional (!isPy3k) enum34;
checkInputs = [
pytestCheckHook
boto3
] ++ lib.optional (pythonOlder "3.4") mock;
preCheck = ''
rm -r fiona # prevent importing local fiona
'';
disabledTests = [
# Some tests access network, others test packaging
"http" "https" "wheel"
];
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 ];
};
}