summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDrew Risinger <drewrisinger@users.noreply.github.com>2020-08-31 21:56:40 -0400
committerJon <jonringer@users.noreply.github.com>2020-09-02 09:08:45 -0700
commitab525faf054d42eb18b7c7f899e8df057b6b63ce (patch)
tree8325cfdb1a78aa5470eb1b67ea36b0456a386cc5 /pkgs
parent3d3eef24ae0604a42f7b369b5c5903d5805c55ff (diff)
downloadnixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.tar
nixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.tar.gz
nixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.tar.bz2
nixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.tar.lz
nixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.tar.xz
nixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.tar.zst
nixpkgs-ab525faf054d42eb18b7c7f899e8df057b6b63ce.zip
python3Packages.cirq: unbreak
Remove unneeded test disables.
Add changelog.
Unpin most python dependencies.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/cirq/default.nix22
1 files changed, 13 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix
index 83fc0d371c1..21f9c5446c3 100644
--- a/pkgs/development/python-modules/cirq/default.nix
+++ b/pkgs/development/python-modules/cirq/default.nix
@@ -48,6 +48,15 @@ buildPythonPackage rec {
     })
   ];
 
+  postPatch = ''
+    substituteInPlace requirements.txt \
+      --replace "freezegun~=0.3.15" "freezegun" \
+      --replace "matplotlib~=3.0" "matplotlib" \
+      --replace "networkx~=2.4" "networkx" \
+      --replace "numpy~=1.16, < 1.19" "numpy" \
+      --replace "protobuf~=3.12.0" "protobuf"
+  '';
+
   propagatedBuildInputs = [
     freezegun
     google_api_core
@@ -64,7 +73,7 @@ buildPythonPackage rec {
   ];
 
   doCheck = true;
-  # pythonImportsCheck = [ "cirq" "cirq.Ciruit" ];  # cirq's importlib hook doesn't work here
+  # pythonImportsCheck = [ "cirq" "cirq.Circuit" ];  # cirq's importlib hook doesn't work here
   dontUseSetuptoolsCheck = true;
   checkInputs = [
     pytestCheckHook
@@ -78,16 +87,10 @@ buildPythonPackage rec {
 
   pytestFlagsArray = [
     "--ignore=dev_tools"  # Only needed when developing new code, which is out-of-scope
+    "--benchmark-disable" # Don't need to run benchmarks when packaging.
   ];
   disabledTests = [
-    "test_serialize_sympy_constants"  # fails due to small error in pi (~10e-7)
-    "test_convert_to_ion_gates" # fails due to rounding error, 0.75 != 0.750...2
-
-    # Newly disabled tests on cirq 0.8
-    # TODO: test & figure out why failing
-    "engine_job_test"
-    "test_health"
-    "test_run_delegation"
+    "test_convert_to_ion_gates" # fails on some systems due to rounding error, 0.75 != 0.750...2
   ] ++ lib.optionals stdenv.isAarch64 [
     # Seem to fail due to math issues on aarch64?
     "expectation_from_wavefunction"
@@ -97,6 +100,7 @@ buildPythonPackage rec {
   meta = with lib; {
     description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.";
     homepage = "https://github.com/quantumlib/cirq";
+    changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}";
     license = licenses.asl20;
     maintainers = with maintainers; [ drewrisinger ];
   };