blob: a67792111af772d8191a931bb51b1300e85a46e8 (
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
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
numpy,
# tests
pytest-cov-stub,
pytest-xdist,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "autograd";
version = "1.9.0";
pyproject = true;
src = fetchFromGitHub {
owner = "HIPS";
repo = "autograd";
tag = "v${version}";
hash = "sha256-R9l+k4qkxlBW4z4ly0H5wfg4mX7kZv41hZlykMKKui0=";
};
postPatch = ''
# don't require pytest-cov
sed -i "/required_plugins/d" pyproject.toml
'';
build-system = [ hatchling ];
dependencies = [ numpy ];
nativeCheckInputs = [
pytest-cov-stub
pytest-xdist
pytestCheckHook
];
pythonImportsCheck = [ "autograd" ];
meta = {
description = "Compute derivatives of NumPy code efficiently";
homepage = "https://github.com/HIPS/autograd";
changelog = "https://github.com/HIPS/autograd/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jluttine ];
};
}
|