tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.hdbscan: fix build error
Sarah Clark
11 months ago
4640bdd3
87d5e58a
+38
-12
1 changed file
expand all
collapse all
unified
split
pkgs
development
python-modules
hdbscan
default.nix
+38
-12
pkgs/development/python-modules/hdbscan/default.nix
reviewed
···
1
1
{
2
2
lib,
3
3
buildPythonPackage,
4
4
+
fetchFromGitHub,
5
5
+
fetchpatch,
6
6
+
4
7
cython,
5
8
numpy,
6
6
-
pytestCheckHook,
7
9
scipy,
8
10
scikit-learn,
9
9
-
fetchPypi,
10
11
joblib,
11
12
six,
13
13
+
14
14
+
# test
15
15
+
pytestCheckHook,
12
16
}:
13
17
14
18
buildPythonPackage rec {
···
20
16
version = "0.8.40";
21
17
format = "setuptools";
22
18
23
23
-
src = fetchPypi {
24
24
-
inherit pname version;
25
25
-
hash = "sha256-yeOD/xe+7gWRB1/2XVJL2ltaNd+wHSGCRae6MMjUihc=";
19
19
+
src = fetchFromGitHub {
20
20
+
owner = "scikit-learn-contrib";
21
21
+
repo = "hdbscan";
22
22
+
tag = "release-${version}";
23
23
+
hash = "sha256-xsBlmSQU47e+M+nRqUXdWKS7Rtj2QZ1UWLAvjSQOJ0Q=";
26
24
};
27
25
26
26
+
patches = [
27
27
+
(fetchpatch {
28
28
+
# Replace obsolete use of assert_raises with pytest.raises
29
29
+
name = "replace-assert_raises";
30
30
+
url = "https://github.com/scikit-learn-contrib/hdbscan/pull/667/commits/04d6a4dcdcd2bb2597419b8aa981d7620765809f.patch";
31
31
+
hash = "sha256-z/u5b2rNPKOCe+3/GVE8rMB5ajeU5PrvLVesjEgj9TA=";
32
32
+
})
33
33
+
];
34
34
+
28
35
pythonRemoveDeps = [ "cython" ];
36
36
+
29
37
nativeBuildInputs = [
30
38
cython
31
31
-
];
32
32
-
propagatedBuildInputs = [
33
33
-
numpy
34
34
-
scipy
35
35
-
scikit-learn
36
39
joblib
40
40
+
numpy
41
41
+
scikit-learn
42
42
+
scipy
37
43
six
38
44
];
45
45
+
39
46
preCheck = ''
40
47
cd hdbscan/tests
41
48
rm __init__.py
42
49
'';
50
50
+
43
51
nativeCheckInputs = [ pytestCheckHook ];
52
52
+
44
53
disabledTests = [
45
54
# known flaky tests: https://github.com/scikit-learn-contrib/hdbscan/issues/420
46
55
"test_mem_vec_diff_clusters"
···
64
47
# more flaky tests https://github.com/scikit-learn-contrib/hdbscan/issues/570
65
48
"test_hdbscan_boruvka_balltree"
66
49
"test_hdbscan_best_balltree_metric"
50
50
+
# "got an unexpected keyword argument"
51
51
+
"test_hdbscan_badargs"
52
52
+
];
53
53
+
54
54
+
disabledTestPaths = [
55
55
+
# joblib.externals.loky.process_executor.BrokenProcessPool:
56
56
+
"test_branches.py"
67
57
];
68
58
69
59
pythonImportsCheck = [ "hdbscan" ];
70
60
71
71
-
meta = with lib; {
61
61
+
meta = {
72
62
description = "Hierarchical Density-Based Spatial Clustering of Applications with Noise, a clustering algorithm with a scikit-learn compatible API";
73
63
homepage = "https://github.com/scikit-learn-contrib/hdbscan";
74
74
-
license = licenses.bsd3;
64
64
+
changelog = "https://github.com/scikit-learn-contrib/hdbscan/releases/tag/release-${version}";
65
65
+
license = lib.licenses.bsd3;
66
66
+
maintainers = [ ];
75
67
};
76
68
}