From 169ee736fcb7e5134d8dd7cc52e7a8eb0786f429 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 1 Jan 2025 15:11:48 +0900 Subject: [PATCH 1/4] python312Packages.macaroonbakery: fix version string --- pkgs/development/python-modules/macaroonbakery/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/macaroonbakery/default.nix b/pkgs/development/python-modules/macaroonbakery/default.nix index e9eb35783996..991c9bfa02a4 100644 --- a/pkgs/development/python-modules/macaroonbakery/default.nix +++ b/pkgs/development/python-modules/macaroonbakery/default.nix @@ -28,6 +28,12 @@ buildPythonPackage rec { hash = "sha256-NEhr8zkrHceeLbAyuUvc7U6dyQxkpkj0m5LlnBMafA0="; }; + # fix version string + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "VERSION = (1, 3, 3)" "VERSION = (1, 3, 4)" + ''; + nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ From 217bf120c02801425afa52c3504e98af0c59e309 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 1 Jan 2025 15:13:30 +0900 Subject: [PATCH 2/4] python312Packages.macaroonbakery: refactor --- pkgs/development/python-modules/macaroonbakery/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/macaroonbakery/default.nix b/pkgs/development/python-modules/macaroonbakery/default.nix index 991c9bfa02a4..f1598d432e1b 100644 --- a/pkgs/development/python-modules/macaroonbakery/default.nix +++ b/pkgs/development/python-modules/macaroonbakery/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "go-macaroon-bakery"; repo = "py-macaroon-bakery"; - rev = "refs/tags/${version}"; + tag = version; hash = "sha256-NEhr8zkrHceeLbAyuUvc7U6dyQxkpkj0m5LlnBMafA0="; }; @@ -34,9 +34,9 @@ buildPythonPackage rec { --replace-fail "VERSION = (1, 3, 3)" "VERSION = (1, 3, 4)" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ protobuf pymacaroons pynacl From c2924cef015556ac42c2b67a4c8660182b40661c Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 1 Jan 2025 14:52:40 +0900 Subject: [PATCH 3/4] python312Packages.craft-store: 3.0.2 -> 3.1.0 Diff: https://github.com/canonical/craft-store/compare/refs/tags/3.0.2...3.1.0 Changelog: https://github.com/canonical/craft-store/releases/tag/3.1.0 --- .../python-modules/craft-store/default.nix | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/craft-store/default.nix b/pkgs/development/python-modules/craft-store/default.nix index f9f8f73e8eb0..4c44e30fa514 100644 --- a/pkgs/development/python-modules/craft-store/default.nix +++ b/pkgs/development/python-modules/craft-store/default.nix @@ -6,55 +6,67 @@ setuptools, setuptools-scm, pytest-check, + pytest-httpx, pytest-mock, - pydantic, pyyaml, pytestCheckHook, - keyring_24, + annotated-types, + httpx, + jaraco-classes, + keyring, macaroonbakery, overrides, + pydantic, pyxdg, requests, requests-toolbelt, + typing-extensions, }: buildPythonPackage rec { pname = "craft-store"; - version = "3.0.2"; + version = "3.1.0"; pyproject = true; src = fetchFromGitHub { owner = "canonical"; repo = "craft-store"; - rev = "refs/tags/${version}"; - hash = "sha256-l8WnuaMJN4/nZRkWoU6omgbd4hKR2m7YC+YVcvAqzcA="; + tag = version; + hash = "sha256-pTG0JJRoHjmcLg+lAgg53rvC+7d3TLlTLe+Rxhy8wqg="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "setuptools==" "setuptools>=" + --replace-fail "setuptools==75.6.0" "setuptools" ''; - build-system = [ setuptools-scm ]; + build-system = [ + setuptools + setuptools-scm + ]; + + pythonRelaxDeps = [ "httpx" ]; dependencies = [ - keyring_24 + annotated-types + httpx + jaraco-classes + keyring macaroonbakery overrides pydantic pyxdg requests requests-toolbelt + typing-extensions ]; - pythonRelaxDeps = [ "macaroonbakery" ]; - pythonImportsCheck = [ "craft_store" ]; nativeCheckInputs = [ - pydantic pytest-check + pytest-httpx pytest-mock pytestCheckHook pyyaml From c465daf0fa5d314d9a85112a346c4c49acbca6e1 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 1 Jan 2025 15:19:42 +0900 Subject: [PATCH 4/4] python312Packages.keyring_24: remove keyring_24 has been removed, use keyring instead --- .../python-modules/keyring_24/default.nix | 81 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 pkgs/development/python-modules/keyring_24/default.nix diff --git a/pkgs/development/python-modules/keyring_24/default.nix b/pkgs/development/python-modules/keyring_24/default.nix deleted file mode 100644 index 05fbb3178147..000000000000 --- a/pkgs/development/python-modules/keyring_24/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchPypi, - pythonOlder, - installShellFiles, - setuptools, - setuptools-scm, - shtab, - importlib-metadata, - jaraco-classes, - jaraco-context, - jaraco-functools, - jeepney, - secretstorage, - pytestCheckHook, -}: - -buildPythonPackage rec { - pname = "keyring_24"; - # nixpkgs-update: no auto update - version = "24.3.1"; - pyproject = true; - disabled = pythonOlder "3.8"; - - src = fetchPypi { - inherit version; - pname = "keyring"; - hash = "sha256-wzJ7b/r8DovvvbWXys20ko/+XBIS92RfGG5tmVeomNs="; - }; - - nativeBuildInputs = [ - installShellFiles - shtab - ]; - - build-system = [ - setuptools - setuptools-scm - ]; - - dependencies = - [ - jaraco-classes - jaraco-context - jaraco-functools - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - jeepney - secretstorage - ] - ++ lib.optionals (pythonOlder "3.12") [ importlib-metadata ]; - - postInstall = '' - installShellCompletion --cmd keyring \ - --bash <($out/bin/keyring --print-completion bash) \ - --zsh <($out/bin/keyring --print-completion zsh) - ''; - - pythonImportsCheck = [ - "keyring" - "keyring.backend" - ]; - - nativeCheckInputs = [ pytestCheckHook ]; - - disabledTestPaths = - [ "tests/backends/test_macOS.py" ] - # These tests fail when sandboxing is enabled because they are unable to get a password from keychain. - ++ lib.optional stdenv.hostPlatform.isDarwin "tests/test_multiprocess.py"; - - meta = with lib; { - description = "Store and access your passwords safely"; - homepage = "https://github.com/jaraco/keyring"; - changelog = "https://github.com/jaraco/keyring/blob/v${version}/NEWS.rst"; - license = licenses.mit; - mainProgram = "keyring"; - maintainers = with maintainers; [ jnsgruk ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 83264b2be12a..e029b854387f 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -316,6 +316,7 @@ mapAliases ({ Kajiki = kajiki; # added 2023-02-19 keepkey_agent = keepkey-agent; # added 2024-01-06 Keras = keras; # added 2021-11-25 + keyring_24 = throw "keyring_24 has been removed, use keyring instead"; # added 2025-01-01 ldap = python-ldap; # added 2022-09-16 lammps-cython = throw "lammps-cython no longer builds and is unmaintained"; # added 2021-07-04 langchainplus-sdk = langsmith; # added 2023-08-01 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index acc79f773b74..00a1779a5c09 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6949,8 +6949,6 @@ self: super: with self; { keyring = callPackage ../development/python-modules/keyring { }; - keyring_24 = callPackage ../development/python-modules/keyring_24 { }; - keyring-pass = callPackage ../development/python-modules/keyring-pass { }; keyrings-cryptfile = callPackage ../development/python-modules/keyrings-cryptfile { };