From 92dc768511f1d5884814cdd9e0af90f98835a74f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Jan 2024 20:53:27 +0100 Subject: [PATCH 1/4] python311Packages.cirq-ft: refactor --- pkgs/development/python-modules/cirq-ft/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cirq-ft/default.nix b/pkgs/development/python-modules/cirq-ft/default.nix index d307191dd9af..3df86a7ba3b2 100644 --- a/pkgs/development/python-modules/cirq-ft/default.nix +++ b/pkgs/development/python-modules/cirq-ft/default.nix @@ -7,15 +7,20 @@ , nbconvert , nbformat , pytestCheckHook +, setuptools }: buildPythonPackage rec { pname = "cirq-ft"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; sourceRoot = "${src.name}/${pname}"; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ attrs cachetools From 04932484262a0a5e20eaced071433e1535a8275a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Jan 2024 20:53:45 +0100 Subject: [PATCH 2/4] python311Packages.cirq-ft: disable failing test --- pkgs/development/python-modules/cirq-ft/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/cirq-ft/default.nix b/pkgs/development/python-modules/cirq-ft/default.nix index 3df86a7ba3b2..a0fbbc40da1f 100644 --- a/pkgs/development/python-modules/cirq-ft/default.nix +++ b/pkgs/development/python-modules/cirq-ft/default.nix @@ -36,6 +36,11 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = [ + # Upstream doesn't always adjust the version + "test_version" + ]; + # cirq's importlib hook doesn't work here #pythonImportsCheck = [ "cirq_ft" ]; From a3cdc83dbfd414531113a43fd8b1eee26537e48f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Jan 2024 21:26:37 +0100 Subject: [PATCH 3/4] python311Packages.cirq-google: disable time-consuming tests --- .../python-modules/cirq-google/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/cirq-google/default.nix b/pkgs/development/python-modules/cirq-google/default.nix index 4f185c825c34..c2d36a4f796d 100644 --- a/pkgs/development/python-modules/cirq-google/default.nix +++ b/pkgs/development/python-modules/cirq-google/default.nix @@ -1,27 +1,23 @@ { buildPythonPackage , cirq-core +, freezegun , google-api-core , protobuf , pytestCheckHook -, freezegun , pythonRelaxDepsHook +, setuptools }: buildPythonPackage rec { pname = "cirq-google"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; sourceRoot = "${src.name}/${pname}"; - 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 "protobuf >= 3.15.0, < 4" "protobuf >= 3.15.0" - ''; - nativeBuildInputs = [ pythonRelaxDepsHook + setuptools ]; propagatedBuildInputs = [ @@ -40,6 +36,8 @@ buildPythonPackage rec { "cirq_google/_version_test.py" # Trace/BPT trap: 5 "cirq_google/engine/calibration_test.py" + # Very time-consuming + "cirq_google/engine/*_test.py" ]; disabledTests = [ From ccb6245ff10bee89565ec66bcad880148d3b27a8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Jan 2024 21:01:10 +0100 Subject: [PATCH 4/4] python311Packages.qcs-api-client: adjust inputs --- pkgs/development/python-modules/qcs-api-client/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/qcs-api-client/default.nix b/pkgs/development/python-modules/qcs-api-client/default.nix index 0b38510d6603..60ed1433794a 100644 --- a/pkgs/development/python-modules/qcs-api-client/default.nix +++ b/pkgs/development/python-modules/qcs-api-client/default.nix @@ -6,7 +6,7 @@ , httpx , iso8601 , poetry-core -, pydantic +, pydantic_1 , pyjwt , pytest-asyncio , pytestCheckHook @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "qcs-api-client"; version = "0.23.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -46,6 +46,7 @@ buildPythonPackage rec { pythonRelaxDeps = [ "attrs" "httpx" + "iso8601" ]; nativeBuildInputs = [ @@ -57,7 +58,7 @@ buildPythonPackage rec { attrs httpx iso8601 - pydantic + pydantic_1 pyjwt python-dateutil retrying