From 880e9225b60faae111c0b0523a12e899e274cd91 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 9 Jul 2024 13:09:39 +0200 Subject: [PATCH] rockcraft: use `setuptools.dist` rather than `distutils.util` --- pkgs/by-name/ro/rockcraft/package.nix | 34 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 14 deletions(-) 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