nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, pandas
6, pytestCheckHook
7, pythonOlder
8, setuptoolsBuildHook
9, setuptools-scm
10}:
11
12buildPythonPackage rec {
13 pname = "xarray";
14 version = "2022.3.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "sha256-OYNEv30XBHeqzv9wIQ4R69aa9rFW/hOXgFTSXEhylEA=";
22 };
23
24 SETUPTOOLS_SCM_PRETEND_VERSION="${version}";
25
26 nativeBuildInputs = [
27 setuptoolsBuildHook
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 numpy
33 pandas
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "xarray"
42 ];
43
44 meta = with lib; {
45 description = "N-D labeled arrays and datasets in Python";
46 homepage = "https://github.com/pydata/xarray";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ fridh ];
49 };
50}