about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/fiona/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/fiona/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/fiona/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/fiona/default.nix b/nixpkgs/pkgs/development/python-modules/fiona/default.nix
new file mode 100644
index 000000000000..3cd8eef93277
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/fiona/default.nix
@@ -0,0 +1,60 @@
+{ 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.21";
+
+  src = fetchPypi {
+    pname = "Fiona";
+    inherit version;
+    sha256 = "sha256-Og7coqegcNtAXXEYchSkPSMzpXtAl1RKP8woIGali/w=";
+  };
+
+  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
+    # disable gdal deprecation warnings
+    export GDAL_ENABLE_DEPRECATED_DRIVER_GTM=YES
+  '';
+
+  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 ];
+  };
+}