Unverified Commit f7acf5db authored by Robert Scott's avatar Robert Scott Committed by GitHub
Browse files

Merge pull request #231267 from vs49688/skyfield

Fix/update python3Packages.skyfield/assay
parents a028bd00 75acbc19
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchFromGitHub }:
{ lib, buildPythonPackage, fetchFromGitHub, pythonAtLeast }:

buildPythonPackage rec {
  pname = "assay";
@@ -18,5 +18,6 @@ buildPythonPackage rec {
    description = "Attempt to write a Python testing framework I can actually stand";
    license = licenses.mit;
    maintainers = with maintainers; [ zane ];
    broken = pythonAtLeast "3.11";
  };
}
+14 −3
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchFromGitHub, certifi, numpy, sgp4, jplephem
{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, certifi, numpy, sgp4, jplephem
, pandas, ipython, matplotlib, assay
}:

buildPythonPackage rec {
  pname = "skyfield";
  version = "1.42";
  version = "1.45";

  src = fetchFromGitHub {
    owner = "skyfielders";
    repo = "python-skyfield";
    rev = version;
    hash = "sha256-aoSkuLhZcEy+13EJQOBHV2/rgmN6aZQHqfj4OOirOG0=";
    hash = "sha256-kZrXNVE+JGPGiVsd6CTwOqfciYLsD2A4pTS3FpqO+Dk=";
  };

  # Fix broken tests on "exotic" platforms.
  # https://github.com/skyfielders/python-skyfield/issues/582#issuecomment-822033858
  postPatch = ''
    substituteInPlace skyfield/tests/test_planetarylib.py \
      --replace "if IS_32_BIT" "if True"
  '';

  propagatedBuildInputs = [ certifi numpy sgp4 jplephem ];

  nativeCheckInputs = [ pandas ipython matplotlib assay ];

  # assay is broken on Python >= 3.11
  # https://github.com/brandon-rhodes/assay/issues/15
  doCheck = pythonOlder "3.11";

  checkPhase = ''
    runHook preCheck