diff --git a/pkgs/by-name/ch/charmcraft/package.nix b/pkgs/by-name/ch/charmcraft/package.nix index 6c340102a502..a2ea187240c8 100644 --- a/pkgs/by-name/ch/charmcraft/package.nix +++ b/pkgs/by-name/ch/charmcraft/package.nix @@ -22,6 +22,9 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace setup.py \ --replace-fail 'version=determine_version()' 'version="${version}"' + + substituteInPlace charmcraft/env.py \ + --replace-fail "distutils.util" "setuptools.dist" ''; propagatedBuildInputs = with python3Packages; [ @@ -44,22 +47,22 @@ python3Packages.buildPythonApplication rec { urllib3 ]; - nativeBuildInputs = with python3Packages; [ - setuptools - ]; + nativeBuildInputs = with python3Packages; [ setuptools ]; - pythonRelaxDeps = [ - "urllib3" - ]; + pythonRelaxDeps = [ "urllib3" ]; - nativeCheckInputs = with python3Packages; [ - pyfakefs - pytest-check - pytest-mock - pytest-subprocess - pytestCheckHook - responses - ] ++ [ git ]; + nativeCheckInputs = + with python3Packages; + [ + pyfakefs + pytest-check + pytest-mock + pytest-subprocess + pytestCheckHook + responses + setuptools + ] + ++ [ git ]; preCheck = '' mkdir -p check-phase diff --git a/pkgs/by-name/ro/rockcraft/package.nix b/pkgs/by-name/ro/rockcraft/package.nix index e1b29f50061b..2443a887a321 100644 --- a/pkgs/by-name/ro/rockcraft/package.nix +++ b/pkgs/by-name/ro/rockcraft/package.nix @@ -1,9 +1,10 @@ -{ lib -, python3Packages -, fetchFromGitHub -, dpkg -, nix-update-script -, python3 +{ + lib, + python3Packages, + fetchFromGitHub, + dpkg, + nix-update-script, + python3, }: python3Packages.buildPythonApplication rec { @@ -20,6 +21,9 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace rockcraft/__init__.py \ --replace-fail "dev" "${version}" + + substituteInPlace rockcraft/utils.py \ + --replace-fail "distutils.util" "setuptools.dist" ''; propagatedBuildInputs = with python3Packages; [ @@ -28,14 +32,16 @@ python3Packages.buildPythonApplication rec { spdx-lookup ]; - nativeCheckInputs = with python3Packages; [ - pytest-check - pytest-mock - pytest-subprocess - pytestCheckHook - ] ++ [ - dpkg - ]; + nativeCheckInputs = + with python3Packages; + [ + pytest-check + pytest-mock + pytest-subprocess + pytestCheckHook + setuptools + ] + ++ [ dpkg ]; preCheck = '' mkdir -p check-phase diff --git a/pkgs/by-name/sn/snapcraft/os-platform.patch b/pkgs/by-name/sn/snapcraft/os-platform.patch index 0b441ec8d4bc..d3c914e73c7b 100644 --- a/pkgs/by-name/sn/snapcraft/os-platform.patch +++ b/pkgs/by-name/sn/snapcraft/os-platform.patch @@ -1,16 +1,8 @@ diff --git a/snapcraft/utils.py b/snapcraft/utils.py -index 511effe2..4af5a029 100644 +index 999a64ec..4f38b4cd 100644 --- a/snapcraft/utils.py +++ b/snapcraft/utils.py -@@ -15,6 +15,7 @@ - # along with this program. If not, see . - - """Utilities for snapcraft.""" -+ - import multiprocessing - import os - import pathlib -@@ -91,7 +92,7 @@ def get_os_platform( +@@ -94,7 +94,7 @@ def get_os_platform( release = platform.release() machine = platform.machine() diff --git a/pkgs/by-name/sn/snapcraft/package.nix b/pkgs/by-name/sn/snapcraft/package.nix index 5fd0b80ce6ec..a79e272ecd64 100644 --- a/pkgs/by-name/sn/snapcraft/package.nix +++ b/pkgs/by-name/sn/snapcraft/package.nix @@ -11,7 +11,7 @@ }: python3Packages.buildPythonApplication rec { pname = "snapcraft"; - version = "8.2.5"; + version = "8.2.12"; pyproject = true; @@ -24,7 +24,7 @@ python3Packages.buildPythonApplication rec { owner = "canonical"; repo = "snapcraft"; rev = "refs/tags/${version}"; - hash = "sha256-+1Gzseuq402m5FvlRAGXl7Lsy2VnRmd1cXNXhkMDDDE="; + hash = "sha256-1PwIbMweeYGi+jLfhFB3LYThqaN2VW7zdyzjD1m57ow="; }; patches = [ @@ -67,6 +67,9 @@ python3Packages.buildPythonApplication rec { substituteInPlace snapcraft/elf/elf_utils.py \ --replace-fail 'arch_linker_path = Path(arch_config.dynamic_linker)' \ 'return str(Path("${glibc}/lib/ld-linux-x86-64.so.2"))' + + substituteInPlace snapcraft_legacy/internal/xattrs.py \ + --replace-fail 'distutils.util' 'setuptools.dist' ''; buildInputs = [ makeWrapper ]; @@ -104,9 +107,7 @@ python3Packages.buildPythonApplication rec { tinydb ]; - nativeBuildInputs = with python3Packages; [ - setuptools - ]; + nativeBuildInputs = with python3Packages; [ setuptools ]; pythonRelaxDeps = [ "docutils" @@ -119,17 +120,21 @@ python3Packages.buildPythonApplication rec { wrapProgram $out/bin/snapcraft --prefix PATH : ${squashfsTools}/bin ''; - nativeCheckInputs = with python3Packages; [ - pytest-check - pytest-cov - pytest-mock - pytest-subprocess - pytestCheckHook - responses - ] ++ [ - git - squashfsTools - ]; + nativeCheckInputs = + with python3Packages; + [ + pytest-check + pytest-cov + pytest-mock + pytest-subprocess + pytestCheckHook + responses + setuptools + ] + ++ [ + git + squashfsTools + ]; preCheck = '' mkdir -p check-phase @@ -160,9 +165,7 @@ python3Packages.buildPythonApplication rec { "test_snap_command_fallback" "test_validate_architectures_supported" "test_validate_architectures_unsupported" - ] ++ lib.optionals stdenv.isAarch64 [ - "test_load_project" - ]; + ] ++ lib.optionals stdenv.isAarch64 [ "test_load_project" ]; disabledTestPaths = [ "tests/unit/commands/test_remote.py" diff --git a/pkgs/development/python-modules/craft-providers/default.nix b/pkgs/development/python-modules/craft-providers/default.nix index 52954f8f0ddf..3269ff03a4de 100644 --- a/pkgs/development/python-modules/craft-providers/default.nix +++ b/pkgs/development/python-modules/craft-providers/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "craft-providers"; - version = "1.24.0"; + version = "1.24.1"; pyproject = true; @@ -30,7 +30,7 @@ buildPythonPackage rec { owner = "canonical"; repo = "craft-providers"; rev = "refs/tags/${version}"; - hash = "sha256-CkaJ8taTsnBpCffe/Eu4/FGpMwKcg3yeLVAahCyEsII="; + hash = "sha256-l57Y+sdCD0/3sBK48N/3p3ns3o0LB4h9FQ35ha1AOV4="; }; patches = [ diff --git a/pkgs/development/python-modules/craft-store/default.nix b/pkgs/development/python-modules/craft-store/default.nix index 853df850c02a..4011b01d60d0 100644 --- a/pkgs/development/python-modules/craft-store/default.nix +++ b/pkgs/development/python-modules/craft-store/default.nix @@ -10,7 +10,7 @@ pydantic_1, pyyaml, pytestCheckHook, - keyring, + keyring_24, macaroonbakery, overrides, pyxdg, @@ -42,7 +42,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - keyring + keyring_24 macaroonbakery overrides pydantic_1 @@ -51,6 +51,8 @@ buildPythonPackage rec { requests-toolbelt ]; + pythonRelaxDeps = [ "macaroonbakery" ]; + pythonImportsCheck = [ "craft_store" ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/keyring_24/default.nix b/pkgs/development/python-modules/keyring_24/default.nix new file mode 100644 index 000000000000..9739a6f7b20a --- /dev/null +++ b/pkgs/development/python-modules/keyring_24/default.nix @@ -0,0 +1,81 @@ +{ + 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.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.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/development/python-modules/launchpadlib/default.nix b/pkgs/development/python-modules/launchpadlib/default.nix index 7ac075625902..d9a6b3b1bd56 100644 --- a/pkgs/development/python-modules/launchpadlib/default.nix +++ b/pkgs/development/python-modules/launchpadlib/default.nix @@ -4,7 +4,7 @@ fetchPypi, isPy3k, httplib2, - keyring, + keyring_24, lazr-restfulclient, lazr-uri, setuptools, @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ httplib2 - keyring + keyring_24 lazr-restfulclient lazr-uri setuptools diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5cd47e370b09..6660e41175d2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6483,6 +6483,8 @@ 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 { };