1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 cython,
7 click,
8 numpy,
9 scipy,
10 pandas,
11 h5py,
12 pytestCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "biom-format";
17 version = "2.1.17";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "biocore";
22 repo = "biom-format";
23 tag = version;
24 hash = "sha256-FjIC21LoqltixBstbbANByjTNxVm/3YCxdWaD9KbOQ0=";
25 };
26
27 build-system = [
28 setuptools
29 cython
30 numpy
31 ];
32
33 dependencies = [
34 click
35 numpy
36 scipy
37 pandas
38 h5py
39 ];
40
41 # make pytest resolve the package from $out
42 # some tests don't work if we change the level of directory nesting
43 preCheck = ''
44 mkdir biom_tests
45 mv biom/tests biom_tests/tests
46 rm -r biom
47 '';
48
49 nativeCheckInputs = [ pytestCheckHook ];
50
51 enabledTestPaths = [ "biom_tests/tests" ];
52
53 pythonImportsCheck = [ "biom" ];
54
55 meta = {
56 homepage = "http://biom-format.org/";
57 description = "Biological Observation Matrix (BIOM) format";
58 license = lib.licenses.bsd3;
59 maintainers = with lib.maintainers; [ tomasajt ];
60 };
61}