From 8cad130f389f4e347a7c0d67f0398ebd4026dd47 Mon Sep 17 00:00:00 2001 From: Anthony ROUSSEL Date: Fri, 30 Aug 2024 23:17:38 +0200 Subject: [PATCH] bashate: enable `pyproject = true` --- pkgs/development/tools/bashate/default.nix | 37 ++++++++++++---------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/pkgs/development/tools/bashate/default.nix b/pkgs/development/tools/bashate/default.nix index fd4161499c72..3cbf97398953 100644 --- a/pkgs/development/tools/bashate/default.nix +++ b/pkgs/development/tools/bashate/default.nix @@ -1,39 +1,42 @@ -{ lib -, babel -, buildPythonApplication -, fetchPypi -, fixtures -, mock -, pbr -, pytestCheckHook -, pythonOlder -, setuptools -, testtools +{ + lib, + fetchPypi, + python3Packages, }: -buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "bashate"; version = "2.1.1"; - disabled = pythonOlder "3.5"; + pyproject = true; + + disabled = python3Packages.pythonOlder "3.5"; src = fetchPypi { inherit pname version; hash = "sha256-S6tul3+DBacgU1+Pk/H7QsUh/LxKbCs9PXZx9C8iH0w="; }; - propagatedBuildInputs = [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ babel pbr setuptools ]; - nativeCheckInputs = [ + nativeCheckInputs = with python3Packages; [ fixtures mock - pytestCheckHook + stestr testtools ]; + checkPhase = '' + runHook preCheck + stestr run + runHook postCheck + ''; + pythonImportsCheck = [ "bashate" ]; meta = with lib; { @@ -41,6 +44,6 @@ buildPythonApplication rec { mainProgram = "bashate"; homepage = "https://opendev.org/openstack/bashate"; license = with licenses; [ asl20 ]; - maintainers = with maintainers; [ fab ]; + maintainers = teams.openstack.members ++ (with maintainers; [ fab ]); }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d87ceb14e4e8..16bf44e616ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3371,7 +3371,9 @@ with pkgs; base16384 = callPackage ../tools/text/base16384 { }; - bashate = python3Packages.callPackage ../development/tools/bashate { }; + bashate = python3Packages.callPackage ../development/tools/bashate { + python3Packages = python311Packages; + }; bash-my-aws = callPackage ../tools/admin/bash-my-aws { };