blob: 72fead1ef8af2fcd8e8f51947e36e614f9dc9a2f (
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
56
57
58
59
60
61
62
63
64
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
meson-python,
numpy,
setuptools,
# nativeBuildInputs
pkg-config,
# dependencies
scikit-learn,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "fastcan";
version = "0.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "scikit-learn-contrib";
repo = "fastcan";
tag = "v${version}";
hash = "sha256-1ncdzBMJYEwTkpLXS64g+SaEbsiYslX7zN4xbGjUsAA=";
};
build-system = [
cython
meson-python
numpy
setuptools
];
nativeBuildInputs = [ pkg-config ];
dependencies = [ scikit-learn ];
# Prevent pytest from importing the required python modules from the source instead of $out
preCheck = ''
rm -f fastcan/__init__.py
echo "" > fastcan/narx/__init__.py
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "fastcan" ];
meta = {
description = "Library for fast canonical-correlation-based search algorithm";
homepage = "https://github.com/scikit-learn-contrib/fastcan";
changelog = "https://github.com/scikit-learn-contrib/fastcan/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ daspk04 ];
};
}
|