Merge pull request #185710 from fabaff/cirq-bump

python310Packages.cirq-core: 0.15.0 -> 1.0.0
This commit is contained in:
Fabian Affolter 2022-10-16 21:53:11 +02:00 committed by GitHub
commit 865105a1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 13 deletions

View File

@ -26,4 +26,9 @@ buildPythonPackage rec {
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_aqt" ];
disabledTestPaths = [
# No need to test the version number
"cirq_aqt/_version_test.py"
];
}

View File

@ -1,5 +1,5 @@
{ stdenv
, lib
{ lib
, stdenv
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
@ -31,15 +31,16 @@
buildPythonPackage rec {
pname = "cirq-core";
version = "0.15.0";
version = "1.0.0";
format = "setuptools";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "quantumlib";
repo = "cirq";
rev = "v${version}";
sha256 = "sha256-E36zXpv+9WBNYvv/shItS7Q34gYqUyADlqWd+m4Jpps=";
hash = "sha256-KJ+z4zGrdGIXcGZzqHtWMf8aAzcn9CtltFawcHVldMQ=";
};
sourceRoot = "source/${pname}";
@ -48,8 +49,7 @@ buildPythonPackage rec {
substituteInPlace requirements.txt \
--replace "matplotlib~=3.0" "matplotlib" \
--replace "networkx~=2.4" "networkx" \
--replace "numpy~=1.16" "numpy" \
--replace "sympy<1.10" "sympy"
--replace "numpy~=1.16" "numpy"
'';
propagatedBuildInputs = [
@ -80,20 +80,25 @@ buildPythonPackage rec {
];
disabledTestPaths = lib.optionals (!withContribRequires) [
# requires external (unpackaged) libraries, so untested.
# Requires external (unpackaged) libraries, so untested
"cirq/contrib/"
# No need to test the version number
"cirq/_version_test.py"
];
disabledTests = [
"test_metadata_search_path" # tries to import flynt, which isn't in Nixpkgs
"test_benchmark_2q_xeb_fidelities" # fails due pandas MultiIndex. Maybe issue with pandas version in nix?
# Tries to import flynt, which isn't in Nixpkgs
"test_metadata_search_path"
# Fails due pandas MultiIndex. Maybe issue with pandas version in nix?
"test_benchmark_2q_xeb_fidelities"
];
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "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 fab ];
broken = (stdenv.isLinux && stdenv.isAarch64);
};
}

View File

@ -2,7 +2,6 @@
, cirq-core
, google-api-core
, protobuf
# test inputs
, pytestCheckHook
, freezegun
}:
@ -15,7 +14,8 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace requirements.txt \
--replace "google-api-core[grpc] >= 1.14.0, < 2.0.0dev" "google-api-core[grpc] >= 1.14.0, < 3.0.0dev"
--replace "google-api-core[grpc] >= 1.14.0, < 2.0.0dev" "google-api-core[grpc] >= 1.14.0, < 3.0.0dev" \
--replace "protobuf >= 3.15.0, < 4" "protobuf >= 3.15.0"
'';
propagatedBuildInputs = [
@ -29,9 +29,15 @@ buildPythonPackage rec {
pytestCheckHook
];
disabledTestPaths = [
# No need to test the version number
"cirq_google/_version_test.py"
];
disabledTests = [
# unittest.mock.InvalidSpecError: Cannot autospec attr 'QuantumEngineServiceClient'
"test_get_engine_sampler_explicit_project_id"
"test_get_engine_sampler"
];
}

View File

@ -26,4 +26,9 @@ buildPythonPackage rec {
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_ionq" ];
disabledTestPaths = [
# No need to test the version number
"cirq_ionq/_version_test.py"
];
}

View File

@ -26,4 +26,9 @@ buildPythonPackage rec {
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_pasqal" ];
disabledTestPaths = [
# No need to test the version number
"cirq_pasqal/_version_test.py"
];
}

View File

@ -75,6 +75,11 @@ buildPythonPackage rec {
pytestCheckHook
];
disabledTestPaths = [
# No need to test the version number
"cirq_rigetti/_version_test.py"
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_rigetti" ];
}

View File

@ -19,4 +19,9 @@ buildPythonPackage rec {
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_web" ];
disabledTestPaths = [
# No need to test the version number
"cirq_web/_version_test.py"
];
}