From ac7e4d826eda13dfce1a42a3ef2894459ff2c1e4 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Wed, 23 Apr 2025 22:02:19 +0100 Subject: [PATCH] gnu: python-bandit: Move to python-check. * gnu/packages/openstack.scm (python-bandit): Move from here ... * gnu/packages/python-check.scm: ... to here. Change-Id: I8e10caee78a1d5922626f30d48cfe2bbe6b2ab2e --- gnu/packages/openstack.scm | 47 -------------------------------- gnu/packages/python-check.scm | 51 ++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index e1d93604dd2..9c5c2d40944 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -52,53 +52,6 @@ #:use-module (guix packages) #:use-module (srfi srfi-1)) -(define-public python-bandit - (package - (name "python-bandit") - (version "1.8.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "bandit" version)) - (sha256 - (base32 "0fhr0rsvh44ix31dwxjw8aj0wklj95368djwk0i98c2dcpmpp17m")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - ;; Two tets fail. - #~(list "--exclude-regex" "test_no_arguments|test_help_arg") - #:phases - #~(modify-phases %standard-phases - ;; TODO: Implement in pypproject-build-system's test-backends. - (replace 'check - (lambda* (#:key tests? test-flags #:allow-other-keys) - (when tests? - (apply invoke "stestr" "run" test-flags))))))) - (native-inputs - (list python-beautifulsoup4 - python-fixtures - python-setuptools - python-stestr - python-testscenarios - python-testtools - python-wheel)) - (propagated-inputs - (list python-gitpython - python-jschema-to-python - python-pyyaml - python-rich - python-sarif-om - python-stevedore)) - (home-page "https://github.com/PyCQA/bandit") - (synopsis "Security oriented static analyser for python code") - (description - "Bandit is a tool designed to find common security issues in Python code. -To do this Bandit processes each file, builds an AST from it, and runs -appropriate plugins against the AST nodes. Once Bandit has finished scanning -all the files it generates a report.") - (license asl2.0))) - (define-public python-cliff (package (name "python-cliff") diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 5e7752442b5..b8fd35f26ee 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1,11 +1,13 @@ ;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Cyril Roelandt +;;; Copyright © 2018, 2020, 2022 Marius Bakke ;;; Copyright © 2019, 2021-2025 Ricardo Wurmus ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2019, 2020, 2021, 2022, 2023, 2024 Maxim Cournoyer ;;; Copyright © 2019, 2021 Hartmut Goebel ;;; Copyright © 2020, 2022 Julien Lepiller -;;; Copyright © 2020, 2022 Marius Bakke +;;; Copyright © 2020 Matthew James Kraai ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2020 Tanguy Le Carrour @@ -289,6 +291,53 @@ Avocado machine readable outputs this one is streamlined (per test results). @end table") (license license:gpl2))) ;some files are under GPLv2 only +(define-public python-bandit + (package + (name "python-bandit") + (version "1.8.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "bandit" version)) + (sha256 + (base32 "0fhr0rsvh44ix31dwxjw8aj0wklj95368djwk0i98c2dcpmpp17m")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Two tets fail. + #~(list "--exclude-regex" "test_no_arguments|test_help_arg") + #:phases + #~(modify-phases %standard-phases + ;; TODO: Implement in pypproject-build-system's test-backends. + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "stestr" "run" test-flags))))))) + (native-inputs + (list python-beautifulsoup4 + python-fixtures + python-setuptools + python-stestr + python-testscenarios + python-testtools + python-wheel)) + (propagated-inputs + (list python-gitpython + python-jschema-to-python + python-pyyaml + python-rich + python-sarif-om + python-stevedore)) + (home-page "https://github.com/PyCQA/bandit") + (synopsis "Security oriented static analyser for python code") + (description + "Bandit is a tool designed to find common security issues in Python code. +To do this Bandit processes each file, builds an AST from it, and runs +appropriate plugins against the AST nodes. Once Bandit has finished scanning +all the files it generates a report.") + (license license:asl2.0))) + (define-public python-beartype (package (name "python-beartype")