pretender: 1.2.0 -> 1.3.0 (#378434)
[NixPkgs.git] / pkgs / development / python-modules / skyfield / default.nix
blobb917cf214890eba2ea35cfa2a3b7b5e6e5ef6f37
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   setuptools,
7   certifi,
8   numpy,
9   sgp4,
10   jplephem,
11   pandas,
12   ipython,
13   matplotlib,
14   assay,
17 buildPythonPackage rec {
18   pname = "skyfield";
19   version = "1.49";
20   pyproject = true;
22   src = fetchFromGitHub {
23     owner = "skyfielders";
24     repo = "python-skyfield";
25     rev = version;
26     hash = "sha256-PZ63sohdfpop3nYQr2RIMjPbrL9jdfincEhw5D8NZ+Y=";
27   };
29   # Fix broken tests on "exotic" platforms.
30   # https://github.com/skyfielders/python-skyfield/issues/582#issuecomment-822033858
31   postPatch = ''
32     substituteInPlace skyfield/tests/test_planetarylib.py \
33       --replace-fail "if IS_32_BIT" "if True"
34   '';
36   build-system = [ setuptools ];
38   dependencies = [
39     certifi
40     numpy
41     sgp4
42     jplephem
43   ];
45   nativeCheckInputs = [
46     pandas
47     ipython
48     matplotlib
49     assay
50   ];
52   checkPhase = ''
53     runHook preCheck
55     cd ci
56     assay --batch skyfield.tests
58     runHook postCheck
59   '';
61   pythonImportsCheck = [ "skyfield" ];
63   meta = with lib; {
64     homepage = "https://github.com/skyfielders/python-skyfield";
65     description = "Elegant astronomy for Python";
66     license = licenses.mit;
67     maintainers = with maintainers; [ zane ];
68   };