at 23.11-beta 2.5 kB view raw
1{ lib 2, stdenv 3, anytree 4, buildPythonPackage 5, cached-property 6, cgen 7, click 8, codepy 9, distributed 10, fetchFromGitHub 11, gcc 12, llvmPackages 13, matplotlib 14, multidict 15, nbval 16, psutil 17, py-cpuinfo 18, pyrevolve 19, pytest-xdist 20, pytestCheckHook 21, pythonOlder 22, pythonRelaxDepsHook 23, scipy 24, sympy 25}: 26 27buildPythonPackage rec { 28 pname = "devito"; 29 version = "4.8.3"; 30 format = "setuptools"; 31 32 disabled = pythonOlder "3.7"; 33 34 src = fetchFromGitHub { 35 owner = "devitocodes"; 36 repo = "devito"; 37 rev = "refs/tags/v${version}"; 38 hash = "sha256-g9rRJF1JrZ6+s3tj4RZHuGOjt5LJjtK9I5CJmq4CJL4="; 39 }; 40 41 pythonRemoveDeps = [ 42 "codecov" 43 "flake8" 44 "pytest-runner" 45 "pytest-cov" 46 ]; 47 48 pythonRelaxDeps = true; 49 50 nativeBuildInputs = [ 51 pythonRelaxDepsHook 52 ]; 53 54 propagatedBuildInputs = [ 55 anytree 56 cached-property 57 cgen 58 click 59 codepy 60 distributed 61 nbval 62 multidict 63 psutil 64 py-cpuinfo 65 pyrevolve 66 scipy 67 sympy 68 ] ++ lib.optionals stdenv.cc.isClang [ 69 llvmPackages.openmp 70 ]; 71 72 nativeCheckInputs = [ 73 gcc 74 matplotlib 75 pytest-xdist 76 pytestCheckHook 77 ]; 78 79 pytestFlagsArray = [ "-x" ]; 80 81 # I've had to disable the following tests since they fail while using nix-build, but they do pass 82 # outside the build. They mostly related to the usage of MPI in a sandboxed environment. 83 disabledTests = [ 84 "test_assign_parallel" 85 "test_cache_blocking_structure_distributed" 86 "test_codegen_quality0" 87 "test_coefficients_w_xreplace" 88 "test_docstrings" 89 "test_docstrings[finite_differences.coefficients]" 90 "test_gs_parallel" 91 "test_if_halo_mpi" 92 "test_if_parallel" 93 "test_init_omp_env_w_mpi" 94 "test_loop_bounds_forward" 95 "test_mpi_nocomms" 96 "test_mpi" 97 "test_index_derivative" 98 "test_new_distributor" 99 "test_setupWOverQ" 100 "test_shortcuts" 101 "test_subdomainset_mpi" 102 ]; 103 104 disabledTestPaths = [ 105 "tests/test_pickle.py" 106 "tests/test_benchmark.py" 107 "tests/test_mpi.py" 108 "tests/test_autotuner.py" 109 "tests/test_data.py" 110 "tests/test_dse.py" 111 "tests/test_gradient.py" 112 ]; 113 114 pythonImportsCheck = [ 115 "devito" 116 ]; 117 118 meta = with lib; { 119 description = "Code generation framework for automated finite difference computation"; 120 homepage = "https://www.devitoproject.org/"; 121 changelog = "https://github.com/devitocodes/devito/releases/tag/v${version}"; 122 license = licenses.mit; 123 maintainers = with maintainers; [ atila ]; 124 }; 125}