From 1bc7736ae73275d9be5afa70b51ccc0be5320589 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Aug 2024 09:40:41 +0200 Subject: [PATCH 1/5] python312Packages.cirq-core: 1.4.0 -> 1.4.1 Diff: https://github.com/quantumlib/cirq/compare/refs/tags/v1.4.0...v1.4.1 Changelog: https://github.com/quantumlib/Cirq/releases/tag/v1.4.1 --- pkgs/development/python-modules/cirq-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix index e12dc6f3255e..c436c208c255 100644 --- a/pkgs/development/python-modules/cirq-core/default.nix +++ b/pkgs/development/python-modules/cirq-core/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "cirq-core"; - version = "1.4.0"; + version = "1.4.1"; format = "setuptools"; disabled = pythonOlder "3.9"; @@ -41,7 +41,7 @@ buildPythonPackage rec { owner = "quantumlib"; repo = "cirq"; rev = "refs/tags/v${version}"; - hash = "sha256-KHwVq0qVtc8E9i2lugILYNwk9awq952w0x4DM+HG7Pg="; + hash = "sha256-1GcRDVgYF+1igZQFlQbiWZmU1WNIJh4CcOftQe6OP6I="; }; sourceRoot = "${src.name}/${pname}"; From 894bd64a4d03cd907eb8cfd1d1352d54a48fdfb7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Aug 2024 09:54:41 +0200 Subject: [PATCH 2/5] python312Packages.duet: 0.2.7 -> 0.2.9 Diff: https://github.com/google/duet/compare/refs/tags/v0.2.7...v0.2.9 --- .../python-modules/duet/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/duet/default.nix b/pkgs/development/python-modules/duet/default.nix index de9685345ba1..2f9720bc0de1 100644 --- a/pkgs/development/python-modules/duet/default.nix +++ b/pkgs/development/python-modules/duet/default.nix @@ -3,25 +3,33 @@ buildPythonPackage, fetchFromGitHub, pytestCheckHook, + pythonOlder, + setuptools, typing-extensions, }: buildPythonPackage rec { pname = "duet"; - version = "0.2.7"; - format = "setuptools"; + version = "0.2.9"; + pyproject = true; + + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "google"; repo = "duet"; - rev = "v${version}"; - hash = "sha256-9CTAupAxZI1twoLpgr7VfECw70QunE6pk+SskiT3JDw="; + rev = "refs/tags/v${version}"; + hash = "sha256-P7JxUigD7ZyhtocV+YuAVxuUYVa4F7PpXuA1CCmcMvg="; }; - propagatedBuildInputs = [ typing-extensions ]; + build-system = [ setuptools ]; + + dependencies = [ typing-extensions ]; nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "duet" ]; + meta = with lib; { description = "Simple future-based async library for python"; homepage = "https://github.com/google/duet"; From 550100413006f0358e7aa53e37eb2912e1e0f1ef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Aug 2024 13:00:13 +0200 Subject: [PATCH 3/5] python312Packages.cirq-rigetti: unbreak --- pkgs/development/python-modules/cirq-rigetti/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/python-modules/cirq-rigetti/default.nix b/pkgs/development/python-modules/cirq-rigetti/default.nix index 932ab71a1500..d6848fe013a4 100644 --- a/pkgs/development/python-modules/cirq-rigetti/default.nix +++ b/pkgs/development/python-modules/cirq-rigetti/default.nix @@ -84,9 +84,4 @@ buildPythonPackage rec { # cirq's importlib hook doesn't work here #pythonImportsCheck = [ "cirq_rigetti" ]; - - meta = cirq-core.meta // { - # ModuleNotFoundError: No module named 'pyquil.parser' - broken = lib.versionAtLeast pyquil.version "4"; - }; } From 5946122ff93217fc0c26bb2e88fb00a35f9f3666 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Aug 2024 13:21:30 +0200 Subject: [PATCH 4/5] python312Pasckages.cirq-ft: remove --- .../python-modules/cirq-ft/default.nix | 45 ------------------- .../python-modules/cirq/default.nix | 3 -- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 4 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 pkgs/development/python-modules/cirq-ft/default.nix diff --git a/pkgs/development/python-modules/cirq-ft/default.nix b/pkgs/development/python-modules/cirq-ft/default.nix deleted file mode 100644 index 6ee4c28c8879..000000000000 --- a/pkgs/development/python-modules/cirq-ft/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - attrs, - buildPythonPackage, - cachetools, - cirq-core, - ipython, - ipywidgets, - nbconvert, - nbformat, - pytestCheckHook, - setuptools, -}: - -buildPythonPackage rec { - pname = "cirq-ft"; - pyproject = true; - inherit (cirq-core) version src meta; - - sourceRoot = "${src.name}/${pname}"; - - nativeBuildInputs = [ setuptools ]; - - propagatedBuildInputs = [ - attrs - cachetools - cirq-core - ipython - ipywidgets - nbconvert - nbformat - ]; - - nativeCheckInputs = [ - ipython - pytestCheckHook - ]; - - disabledTests = [ - # Upstream doesn't always adjust the version - "test_version" - ]; - - # cirq's importlib hook doesn't work here - #pythonImportsCheck = [ "cirq_ft" ]; -} diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix index d640655c4cd8..54eee66b5f20 100644 --- a/pkgs/development/python-modules/cirq/default.nix +++ b/pkgs/development/python-modules/cirq/default.nix @@ -2,7 +2,6 @@ buildPythonPackage, cirq-aqt, cirq-core, - cirq-ft, cirq-google, cirq-ionq, cirq-pasqal, @@ -19,7 +18,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ cirq-aqt cirq-core - cirq-ft cirq-ionq cirq-google cirq-rigetti @@ -34,7 +32,6 @@ buildPythonPackage rec { disabledTestPaths = [ "cirq-aqt" "cirq-core" - "cirq-ft" "cirq-google" "cirq-ionq" "cirq-pasqal" diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index d210b6970090..fd78ca2714e1 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -97,6 +97,7 @@ mapAliases ({ chiavdf = throw "chiavdf has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # added 2023-11-26 chia-rs = throw "chia-rs has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # added 2023-11-26 class-registry = phx-class-registry; # added 2021-10-05 + cirq-ft = throw "cirq-ft is not longer provieded by cirq upstream"; # added 2024-08-31 cld2-cffi = throw "cld2-cffi has been removed, as the last release was in 2016"; # added 2024-05-20 clvm = throw "clvm has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # added 2023-11-26 clvm-rs = throw "clvm-rs has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # added 2023-11-26 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4332f6d5adcc..479bfccd92a4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2221,8 +2221,6 @@ self: super: with self; { cirq-core = callPackage ../development/python-modules/cirq-core { }; - cirq-ft = callPackage ../development/python-modules/cirq-ft { }; - cirq-ionq = callPackage ../development/python-modules/cirq-ionq { }; cirq-google = callPackage ../development/python-modules/cirq-google { }; From 25e518ac628524ed23feb116763c510ffeb0a166 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Aug 2024 13:21:45 +0200 Subject: [PATCH 5/5] python312Packages.cirq-core: refactor --- .../python-modules/cirq-core/default.nix | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix index c436c208c255..b2cf178596b5 100644 --- a/pkgs/development/python-modules/cirq-core/default.nix +++ b/pkgs/development/python-modules/cirq-core/default.nix @@ -1,39 +1,38 @@ { lib, stdenv, - buildPythonPackage, - pythonOlder, - fetchFromGitHub, attrs, + autoray ? null, + buildPythonPackage, duet, + fetchFromGitHub, + freezegun, matplotlib, networkx, numpy, + opt-einsum, pandas, + ply, + pylatex ? null, + pyquil ? null, + pytest-asyncio, + pytestCheckHook, + pythonOlder, + quimb ? null, requests, scipy, + setuptools, sortedcontainers, sympy, tqdm, typing-extensions, - # Contrib requirements withContribRequires ? false, - autoray ? null, - opt-einsum, - ply, - pylatex ? null, - pyquil ? null, - quimb ? null, - # test inputs - pytestCheckHook, - freezegun, - pytest-asyncio, }: buildPythonPackage rec { pname = "cirq-core"; version = "1.4.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.9"; @@ -51,7 +50,9 @@ buildPythonPackage rec { --replace "matplotlib~=3.0" "matplotlib" ''; - propagatedBuildInputs = + build-system = [ setuptools ]; + + dependencies = [ attrs duet