nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hypothesis,
6 numpy,
7 pytest-cov-stub,
8 pytestCheckHook,
9 python,
10 setuptools-scm,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "fast-histogram";
16 version = "0.14";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "astrofrog";
21 repo = "fast-histogram";
22 tag = "v${version}";
23 hash = "sha256-vIzDDzz6e7PXArHdZdSSgShuTjy3niVdGtXqgmyJl1w=";
24 };
25
26 build-system = [
27 setuptools
28 setuptools-scm
29 ];
30
31 dependencies = [ numpy ];
32
33 nativeCheckInputs = [
34 hypothesis
35 pytest-cov-stub
36 pytestCheckHook
37 ];
38
39 enabledTestPaths = [ "${placeholder "out"}/${python.sitePackages}" ];
40
41 pythonImportsCheck = [ "fast_histogram" ];
42
43 disabledTests = [
44 # ValueError
45 "test_1d_compare_with_numpy"
46 ];
47
48 meta = {
49 description = "Fast 1D and 2D histogram functions in Python";
50 homepage = "https://github.com/astrofrog/fast-histogram";
51 changelog = "https://github.com/astrofrog/fast-histogram/blob/v${version}/CHANGES.md";
52 license = lib.licenses.bsd2;
53 maintainers = with lib.maintainers; [ ifurther ];
54 };
55}