Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / wrf-python / default.nix
blob29279cc1a44805dc38ba1bd4dae979aa632d5f41
1 {lib, fetchFromGitHub, pythonOlder, buildPythonPackage, gfortran, mock, xarray, wrapt, numpy, netcdf4, setuptools}:
3 buildPythonPackage rec {
4   pname = "wrf-python";
5   version = "1.3.2";
7   src = fetchFromGitHub {
8     owner = "NCAR";
9     repo = "wrf-python";
10     rev = version;
11     sha256 = "1rklkki54z5392cpwwy78bnmsy2ghc187l3j7nv0rzn6jk5bvyi7";
12   };
14   propagatedBuildInputs = [
15     wrapt
16     numpy
17     setuptools
18     xarray
19   ];
21   nativeBuildInputs = [
22     gfortran
23   ];
25   checkInputs = [
26     netcdf4
27   ] ++ lib.optional (pythonOlder "3.3") mock;
29   doCheck = true;
30   checkPhase = ''
31     runHook preCheck
32     cd ./test/ci_tests
33     python utests.py
34     runHook postCheck
35   '';
37   meta = {
38     description = "WRF postprocessing library for Python";
39     homepage = "http://wrf-python.rtfd.org";
40     license = lib.licenses.asl20;
41     maintainers = with lib.maintainers; [ mhaselsteiner ];
42   };