1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 aesara,
8 numpy,
9 scipy,
10 numdifftools,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "aeppl";
16 version = "0.1.5";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "aesara-devs";
23 repo = "aeppl";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-mqBbXwWJwQA2wSHuEdBeXQMfTIcgwYEjpq8AVmOjmHM=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 aesara
32 numpy
33 scipy
34 ];
35
36 nativeCheckInputs = [
37 numdifftools
38 pytestCheckHook
39 ];
40
41 preCheck = ''
42 export HOME=$(mktemp -d);
43 '';
44
45 pythonImportsCheck = [ "aeppl" ];
46
47 disabledTests = [
48 # Compute issue
49 "test_initial_values"
50 ];
51
52 pytestFlagsArray = [
53 # `numpy.distutils` is deprecated since NumPy 1.23.0, as a result of the deprecation of `distutils` itself.
54 # It will be removed for Python >= 3.12. For older Python versions it will remain present.
55 "-Wignore::DeprecationWarning"
56 # Blas cannot be found, allow fallback to the numpy slower implementation
57 "-Wignore::UserWarning"
58 ];
59
60 meta = with lib; {
61 description = "Library for an Aesara-based PPL";
62 homepage = "https://github.com/aesara-devs/aeppl";
63 changelog = "https://github.com/aesara-devs/aeppl/releases/tag/v${version}";
64 license = licenses.mit;
65 maintainers = with maintainers; [ fab ];
66 };
67}