guix_mirror_bot pushed a commit to branch python-team in repository guix. commit a05683a22b784f0398208d4b9e4f2e59762378df Author: Sharlatan Hellseher <sharlata...@gmail.com> AuthorDate: Tue Aug 19 12:01:39 2025 +0100
gnu: python-strictyaml: Unbundle ruamel.yaml. * gnu/packages/serialization.scm (python-strictyaml) [source] <snippet>: Delete bundled ruamel. [arguments] <tests?>: Disable as depends on custom test runner and Docker. <phases>: Add 'remove-bundled-ruamel. [propagated-inputs]: Remove python-ruamel.yaml; add python-ruamel.yaml-0.16. [native-inputs]: Remove python-wheel. [home-page]: Fix it as seen on GitHub page. Change-Id: I5dfda477bcbedcac631fd2b3b3151a612b4c71f7 --- gnu/packages/serialization.scm | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 3766159600..64b56ca5a9 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -915,11 +915,39 @@ style and key ordering are kept, so you can diff the source.") (method url-fetch) (uri (pypi-uri "strictyaml" version)) (sha256 - (base32 "01y4hrakk1psdj6ir5k70apqkjjipvja0c40pbfvahmbzjjm9y12")))) + (base32 "01y4hrakk1psdj6ir5k70apqkjjipvja0c40pbfvahmbzjjm9y12")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Unbundle ruamel. + (delete-file-recursively "strictyaml/ruamel"))))) (build-system pyproject-build-system) - (propagated-inputs (list python-dateutil python-ruamel.yaml)) - (native-inputs (list python-setuptools python-wheel)) - (home-page "https://pypi.org/project/strictyaml/") + (arguments + (list + ;; XXX: Tests require running Docker and an external test framework, + ;; see: <https://github.com/crdoconnor/strictyaml/blob/1.7.3/key.sh> + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-bundled-ruamel + (lambda _ + (substitute* "pyproject.toml" + ((", \"strictyaml.ruamel\"") + "") + (("\"python-dateutil>=2.6.0\"" dateutils) + (string-append dateutils ", \"ruamel.yaml\""))) + (substitute* "strictyaml/parser.py" + (("from strictyaml import ruamel") + "import ruamel.yaml")) + (substitute* (find-files "." "\\.py$") + (("from strictyaml.ruamel") + "from ruamel.yaml"))))))) + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-dateutil + python-ruamel.yaml-0.16)) + (home-page "https://hitchdev.com/strictyaml/") (synopsis "Strict, typed YAML parser") (description "StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification.")