1{ stdenv, buildPythonPackage, fetchPypi
2, python, pytest, sortedcontainers }:
3
4buildPythonPackage rec {
5 version = "2.1.0";
6 pname = "intervaltree";
7 name = "${pname}-${version}";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "02w191m9zxkcjqr1kv2slxvhymwhj3jnsyy3a28b837pi15q19dc";
12 };
13
14 buildInputs = [ pytest ];
15
16 propagatedBuildInputs = [ sortedcontainers ];
17
18 checkPhase = ''
19 runHook preCheck
20 # pytest will try to run tests for nix_run_setup.py / files in build/lib which fails
21 mv nix_run_setup.py run_setup
22 rm build -rf
23 ${python.interpreter} run_setup test
24 runHook postCheck
25 '';
26
27 meta = with stdenv.lib; {
28 description = "Editable interval tree data structure for Python 2 and 3";
29 homepage = https://github.com/chaimleib/intervaltree;
30 license = [ licenses.asl20 ];
31 maintainers = [ maintainers.bennofs ];
32 };
33}