Unverified Commit fb132593 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #228604 from wegank/cirq-fix

python310Packages.cirq: fix build
parents 715c2121 8f218d6d
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -45,11 +45,20 @@ buildPythonPackage rec {

  sourceRoot = "source/${pname}";

  patches = [
    # https://github.com/quantumlib/Cirq/pull/5991
    (fetchpatch {
      url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-cirq/cirq-pr5991-np1.24.patch?rev=8";
      stripLen = 1;
      hash = "sha256-d2FpaxM1PsPWT9ZM9v2gVrnLCy9zmvkkyAVgo85eL3U=";
    })
  ];

  postPatch = ''
    substituteInPlace requirements.txt \
      --replace "matplotlib~=3.0" "matplotlib" \
      --replace "networkx~=2.4" "networkx" \
      --replace "numpy~=1.16" "numpy"
      --replace "numpy>=1.16,<1.24" "numpy"
  '';

  propagatedBuildInputs = [
@@ -91,6 +100,8 @@ buildPythonPackage rec {
    "test_metadata_search_path"
    # Fails due pandas MultiIndex. Maybe issue with pandas version in nix?
    "test_benchmark_2q_xeb_fidelities"
    # https://github.com/quantumlib/Cirq/pull/5991
    "test_json_and_repr_data"
  ];

  meta = with lib; {
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ buildPythonPackage rec {
  disabledTestPaths = [
    # No need to test the version number
    "cirq_google/_version_test.py"
    # Trace/BPT trap: 5
    "cirq_google/engine/calibration_test.py"
  ];

  disabledTests = [
+5 −0
Original line number Diff line number Diff line
@@ -31,4 +31,9 @@ buildPythonPackage rec {
    # No need to test the version number
    "cirq_ionq/_version_test.py"
  ];

  disabledTests = [
    # DeprecationWarning: decompose_to_device was used but is deprecated.
    "test_decompose_operation_deprecated"
  ];
}
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ buildPythonPackage rec {

  pythonRelaxDeps = [
    "lark"
    "networkx"
  ];

  nativeBuildInputs = [