gnu: python-cfn-lint: Update to 1.22.1.

* gnu/packages/python-web.scm (python-cfn-lint): Update to 1.22.1. Fix
build, improve package style.
[source]<url>: Use direct URL instead of home-page field.
[build-system]: Swap to pyproject-build-system.
[arguments]<phases>: Remove 'skip-network-test, use default 'check.
<test-flags>: Skip 4 failing tests.
[propagated-inputs]: Remove python-jsonschema and python-six; add
python-regex, python-sympy, and python-typing-extensions.
[native-inputs]: Remove python-mock; add python-defusedxml,
python-pytest, python-setuptools, and python-wheel.
[home-page]: Place above synopsis.

Change-Id: I39d1ed9ca6157e618d2c5905dff61679ff924a4e
This commit is contained in:
Sharlatan Hellseher 2024-12-16 16:06:26 +00:00
parent 82225664fa
commit 63547f5c50
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -1138,54 +1138,50 @@ decode and default on encode.
(define-public python-cfn-lint (define-public python-cfn-lint
(package (package
(name "python-cfn-lint") (name "python-cfn-lint")
(version "0.65.0") (version "1.22.1")
(home-page "https://github.com/aws-cloudformation/cfn-lint")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url home-page) (url "https://github.com/aws-cloudformation/cfn-lint")
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1rfacp39jssrbchrzb49vwrqyzhx5v7jfcgngqnb9r7qfs4bwi3w")))) "1zz121r9yv1irwdbk07s7958fh43h3r3q39qcj0gv4kpgb0vdf32"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:test-flags
(add-after 'unpack 'skip-network-test #~(list "-k" (string-join
(lambda _ (list
;; This test requires networking. ;; Skip documentation tests.
(substitute* "test/unit/module/formatters/test_formatters.py" "not test_update_docs"
(("def test_sarif_formatter") "def _test_sarif_formatter")))) ;; Tests fail with error: AssertinError ...
(replace 'check "test_parameter_for_autopublish_code_sha256"
(lambda* (#:key inputs outputs tests? #:allow-other-keys) "test_sam_with_language_extension"
(when tests? ;; Test fails with error: diff error while comparing
(let ((out (assoc-ref outputs "out"))) ;; graphs.
;; Remove test for the documentation update scripts "test_build_graph")
;; to avoid a dependency on 'git'. " and not "))))
(delete-file
"test/unit/module/maintenance/test_update_documentation.py")
(delete-file
"test/unit/module/maintenance/test_update_resource_specs.py")
(add-installed-pythonpath inputs outputs)
(setenv "PATH" (string-append out "/bin:"
(getenv "PATH")))
(invoke "python" "-m" "unittest" "discover"
"-s" "test"))))))))
(native-inputs (native-inputs
(list python-pydot python-mock)) (list python-defusedxml
python-pydot
python-pytest
python-setuptools
python-wheel))
(propagated-inputs (propagated-inputs
(list python-aws-sam-translator (list python-aws-sam-translator
python-importlib-resources python-importlib-resources
python-jschema-to-python python-jschema-to-python
python-jsonpatch python-jsonpatch
python-jsonschema
python-junit-xml python-junit-xml
python-networkx python-networkx
python-pyyaml python-pyyaml
python-regex
python-sarif-om python-sarif-om
python-six)) python-sympy
python-typing-extensions))
(home-page "https://github.com/aws-cloudformation/cfn-lint")
(synopsis "Validate CloudFormation templates") (synopsis "Validate CloudFormation templates")
(description (description
"This package lets you validate CloudFormation YAML/JSON templates against "This package lets you validate CloudFormation YAML/JSON templates against