1{
2 lib,
3 buildPythonPackage,
4 pytestCheckHook,
5 fetchFromGitHub,
6 python,
7 pythonOlder,
8 setuptools,
9 setuptools-scm,
10 numpy,
11 wheel,
12 hypothesis,
13 pytest-cov,
14}:
15
16buildPythonPackage rec {
17 pname = "fast-histogram";
18 version = "0.14";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "astrofrog";
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 sha256 = "sha256-vIzDDzz6e7PXArHdZdSSgShuTjy3niVdGtXqgmyJl1w=";
28 };
29
30 nativeBuildInputs = [
31 setuptools
32 setuptools-scm
33 wheel
34 ];
35
36 propagatedBuildInputs = [ numpy ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 hypothesis
41 pytest-cov
42 ];
43
44 pytestFlagsArray = [ "${builtins.placeholder "out"}/${python.sitePackages}" ];
45
46 pythonImportsCheck = [ "fast_histogram" ];
47
48 meta = with lib; {
49 homepage = "https://github.com/astrofrog/fast-histogram";
50 description = "Fast 1D and 2D histogram functions in Python";
51 license = licenses.bsd2;
52 maintainers = with maintainers; [ ifurther ];
53 };
54}