summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/fast-histogram/default.nix
blob: ce455c5980c714220f0f728874f0f9ff39665940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hypothesis,
  numpy,
  pytest-cov-stub,
  pytestCheckHook,
  python,
  setuptools-scm,
  setuptools,
}:

buildPythonPackage rec {
  pname = "fast-histogram";
  version = "0.14";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "astrofrog";
    repo = "fast-histogram";
    tag = "v${version}";
    hash = "sha256-vIzDDzz6e7PXArHdZdSSgShuTjy3niVdGtXqgmyJl1w=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [ numpy ];

  nativeCheckInputs = [
    hypothesis
    pytest-cov-stub
    pytestCheckHook
  ];

  enabledTestPaths = [ "${placeholder "out"}/${python.sitePackages}" ];

  pythonImportsCheck = [ "fast_histogram" ];

  disabledTests = [
    # ValueError
    "test_1d_compare_with_numpy"
  ];

  meta = {
    description = "Fast 1D and 2D histogram functions in Python";
    homepage = "https://github.com/astrofrog/fast-histogram";
    changelog = "https://github.com/astrofrog/fast-histogram/blob/v${version}/CHANGES.md";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ ifurther ];
  };
}