summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/cftime/default.nix32
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cftime/default.nix b/pkgs/development/python-modules/cftime/default.nix
new file mode 100644
index 000000000000..0e355723604e
--- /dev/null
+++ b/pkgs/development/python-modules/cftime/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, coveralls
+, pytestcov
+, cython
+, numpy
+}:
+
+buildPythonPackage rec {
+  pname = "cftime";
+  version = "1.0.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "f62fe79ed2ad38f4211477e59f6f045c91278351f4ce7578e33ddf52fb121ea8";
+  };
+
+  checkInputs = [ pytest coveralls pytestcov ];
+  buildInputs = [ cython ];
+  propagatedBuildInputs = [ numpy ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+  meta = {
+    description = "Time-handling functionality from netcdf4-python";
+  };
+
+}
\ No newline at end of file
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ac8c6f7651d9..484d2bc8c62b 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1566,6 +1566,8 @@ in {
 
   cherrypy = callPackage ../development/python-modules/cherrypy {};
 
+  cftime = callPackage ../development/python-modules/cftime {};
+
   cjson = callPackage ../development/python-modules/cjson { };
 
   cld2-cffi = callPackage ../development/python-modules/cld2-cffi {};