Merge pull request #172869 from drewrisinger/dr-pr-cirq-bump

python3Packages.cirq*: 0.13.1 -> 0.14.1, fix build
main
Fabian Affolter 2 years ago committed by GitHub
commit e0e22616ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 27
      pkgs/development/python-modules/cirq-core/default.nix
  2. 9
      pkgs/development/python-modules/cirq/default.nix

@ -30,7 +30,7 @@
buildPythonPackage rec {
pname = "cirq-core";
version = "0.13.1";
version = "0.14.1";
disabled = pythonOlder "3.6";
@ -38,32 +38,17 @@ buildPythonPackage rec {
owner = "quantumlib";
repo = "cirq";
rev = "v${version}";
sha256 = "sha256-MVfJ8iEeW8gFvCNTqrWfYpNNYuDAufHgcjd7Nh3qp8U=";
sha256 = "sha256-cIDwV3IBXrTJ4jC1/HYmduY3tLe/f6wj8CWZ4cnThG8=";
};
sourceRoot = "source/${pname}";
patches = [
# present in upstream master - remove after 0.13.1
(fetchpatch {
name = "fix-test-tolerances.part-1.patch";
url = "https://github.com/quantumlib/Cirq/commit/eb1d9031e55d3c8801ea44abbb6a4132b2fc5126.patch";
sha256 = "0ka24v6dfxnap9p07ni32z9zccbmw0lbrp5mcknmpsl12hza98xm";
stripLen = 1;
})
(fetchpatch {
name = "fix-test-tolerances.part-2.patch";
url = "https://github.com/quantumlib/Cirq/commit/a28d601b2bcfc393336375c53e5915fd16455395.patch";
sha256 = "0k2dqsm4ydn6556d40kc8j04jgjn59z4wqqg1jn1r916a7yxw493";
stripLen = 1;
})
];
postPatch = ''
substituteInPlace requirements.txt \
--replace "matplotlib~=3.0" "matplotlib" \
--replace "networkx~=2.4" "networkx" \
--replace "numpy~=1.16" "numpy"
--replace "numpy~=1.16" "numpy" \
--replace "sympy<1.10" "sympy"
'';
propagatedBuildInputs = [
@ -93,9 +78,9 @@ buildPythonPackage rec {
freezegun
];
pytestFlagsArray = lib.optionals (!withContribRequires) [
disabledTestPaths = lib.optionals (!withContribRequires) [
# requires external (unpackaged) libraries, so untested.
"--ignore=cirq/contrib/"
"cirq/contrib/"
];
disabledTests = [
"test_metadata_search_path" # tries to import flynt, which isn't in Nixpkgs

@ -1,4 +1,5 @@
{ buildPythonPackage
, fetchpatch
, cirq-aqt
, cirq-core
, cirq-google
@ -14,6 +15,14 @@ buildPythonPackage rec {
pname = "cirq";
inherit (cirq-core) version src meta;
patches = [
(fetchpatch {
url = "https://github.com/quantumlib/Cirq/commit/b832db606e5f1850b1eda168a6d4a8e77d8ec711.patch";
name = "pr-5330-prevent-implicit-packages.patch";
sha256 = "sha256-HTEH3fFxPiBedaz5GxZjXayvoiazwHysKZIOzqwZmbg=";
})
];
propagatedBuildInputs = [
cirq-aqt
cirq-core

Loading…
Cancel
Save