Unverified Commit 29d6c423 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

pypy3Packages.matplotlib: fix failing dependencies (#481375)

parents 70cd18d9 042bbfd3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3,9 +3,11 @@
  fetchFromGitHub,
  buildPythonPackage,
  cffi,
  isPyPy,
  # overridden as pkgs.brotli
  brotli,
  setuptools,
  pycparser,
  pytestCheckHook,
  hypothesis,
}:
@@ -28,7 +30,7 @@ buildPythonPackage rec {

  propagatedNativeBuildInputs = [ cffi ];

  dependencies = [ cffi ];
  dependencies = [ cffi ] ++ lib.optional isPyPy pycparser;

  preBuild = ''
    export USE_SHARED_BROTLI=1
+4 −0
Original line number Diff line number Diff line
@@ -129,6 +129,10 @@ buildPythonPackage rec {
    "test_resolving_standard_reversible_as_generic"
    "test_resolving_standard_sequence_as_generic"
    "test_specialised_collection_types"
  ]
  ++ lib.optionals isPyPy [
    # hypothesis.errors.Unsatisfiable: Could not find any examples from datetimes(min_value=datetime.datetime(2003, 1, 1, 0, 0), max_value=datetime.datetime(2005, 12, 31, 23, 59, 59, 999999)) that satisfied lambda x: x.month == 2 and x.day == 29
    "test_bordering_on_a_leap_year"
  ];

  pythonImportsCheck = [ "hypothesis" ];
+17 −12
Original line number Diff line number Diff line
@@ -93,7 +93,12 @@ buildPythonPackage rec {
  # installed under the same path which is not true in Nix.
  # With the following patch we just hard-code these paths into the install
  # script.
  postPatch = ''
  postPatch =
    lib.optionalString isPyPy ''
      substituteInPlace tools/generate_matplotlibrc.py \
        --replace-fail "/usr/bin/env python3" "/usr/bin/env pypy3"
    ''
    + ''
      substituteInPlace pyproject.toml \
        --replace-fail "meson-python>=0.13.1,<0.17.0" meson-python

+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
  hatch-vcs,
  hatchling,
  platformdirs,
  pytest-freezer,
  pytest-mock,
  pytestCheckHook,
  time-machine,
@@ -43,6 +44,7 @@ buildPythonPackage rec {
    pytest-mock
    pytestCheckHook
  ]
  ++ lib.optionals isPyPy [ pytest-freezer ]
  ++ lib.optionals (!isPyPy) [ time-machine ];

  disabledTestPaths = [