summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm49
1 files changed, 37 insertions, 12 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 36869c5d19..e7b3b98c96 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34365,24 +34365,49 @@ facility for filtering those results.")
(define-public python-safety
(package
(name "python-safety")
- (version "1.9.0")
+ (version "3.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "safety" version))
(sha256
- (base32 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
- (build-system python-build-system)
+ (base32 "1qzplv044yfr8w41h0qmjc8lj2admk029azsqbax70wzd4kzh858"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'disable-tests
- (lambda _
- (substitute* "tests/test_safety.py"
- ;; requires network
- (("def test_check_live")
- "def _test_check_live")) #t)))))
- (propagated-inputs (list python-click python-dparse python-packaging
- python-requests))
+ (list
+ #:test-flags
+ #~(list "-k" (string-join
+ ;; test_announcements fails with AssertionError.
+ (list "not test_announcements_if_is_not_tty"
+ ;; Tests below need a network connection.
+ "test_check_live"
+ "test_check_live_cached"
+ "test_get_packages_licenses_without_api_key")
+ " and not "))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'set-home ; some tests run mkdir
+ (lambda _
+ (setenv "HOME" "/tmp"))))))
+ (native-inputs (list nss-certs-for-test python-hatchling python-pytest))
+ (propagated-inputs (list python-authlib
+ python-click
+ python-dparse
+ python-filelock
+ python-httpx
+ python-jinja2
+ python-marshmallow
+ python-nltk
+ python-packaging
+ python-psutil
+ python-pydantic-2
+ python-requests
+ python-ruamel.yaml
+ python-safety-schemas
+ python-tenacity
+ python-tomli
+ python-tomlkit
+ python-typer
+ python-typing-extensions))
(home-page "https://github.com/pyupio/safety")
(synopsis "Check installed dependencies for known vulnerabilities")
(description