summary refs log tree commit diff
path: root/pkgs/development/python-modules/intervaltree
diff options
context:
space:
mode:
authorwisut hantanong <wizzup@gmail.com>2017-07-15 16:19:34 +0700
committerJörg Thalheim <joerg@thalheim.io>2017-07-15 17:40:55 +0100
commitf0ac8236968eb5a38a5f0cd21b014a8fe8715e56 (patch)
treedade6aa31ae463ec7bc8b3236d32fc911c4cb297 /pkgs/development/python-modules/intervaltree
parentcca503b3891dab1cc2cf0dbd4a8095f87d1fcff9 (diff)
downloadnixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.tar
nixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.tar.gz
nixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.tar.bz2
nixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.tar.lz
nixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.tar.xz
nixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.tar.zst
nixpkgs-f0ac8236968eb5a38a5f0cd21b014a8fe8715e56.zip
python.pkgs.intervaltree: move to separate expression
Diffstat (limited to 'pkgs/development/python-modules/intervaltree')
-rw-r--r--pkgs/development/python-modules/intervaltree/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/intervaltree/default.nix b/pkgs/development/python-modules/intervaltree/default.nix
new file mode 100644
index 00000000000..69b35df2973
--- /dev/null
+++ b/pkgs/development/python-modules/intervaltree/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, python, pytest, sortedcontainers }:
+
+buildPythonPackage rec {
+  version = "2.1.0";
+  pname = "intervaltree";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "02w191m9zxkcjqr1kv2slxvhymwhj3jnsyy3a28b837pi15q19dc";
+  };
+
+  buildInputs = [ pytest ];
+
+  propagatedBuildInputs = [ sortedcontainers ];
+
+  checkPhase = ''
+    runHook preCheck
+    # pytest will try to run tests for nix_run_setup.py / files in build/lib which fails
+    mv nix_run_setup.py run_setup
+    rm build -rf
+    ${python.interpreter} run_setup test
+    runHook postCheck
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Editable interval tree data structure for Python 2 and 3";
+    homepage =  https://github.com/chaimleib/intervaltree;
+    license = [ licenses.asl20 ];
+    maintainers =  [ maintainers.bennofs ];
+  };
+}