diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-08-19 12:01:39 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-09-25 09:36:11 +0100 |
| commit | 262a7d9cdbc0e5de08133824c50bfc9bb6d17ced (patch) | |
| tree | 1dd9612c8ef1c28d33af0041e176f00d860da4cf | |
| parent | 0a0ea43b7e36eda4cc67bd7dcb5e85f2fbf56cd4 (diff) | |
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
| -rw-r--r-- | gnu/packages/serialization.scm | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 86829c0d7c2..aa4fb15c5f1 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm | |||
| @@ -846,11 +846,39 @@ style and key ordering are kept, so you can diff the source.") | |||
| 846 | (method url-fetch) | 846 | (method url-fetch) |
| 847 | (uri (pypi-uri "strictyaml" version)) | 847 | (uri (pypi-uri "strictyaml" version)) |
| 848 | (sha256 | 848 | (sha256 |
| 849 | (base32 "01y4hrakk1psdj6ir5k70apqkjjipvja0c40pbfvahmbzjjm9y12")))) | 849 | (base32 "01y4hrakk1psdj6ir5k70apqkjjipvja0c40pbfvahmbzjjm9y12")) |
| 850 | (modules '((guix build utils))) | ||
| 851 | (snippet | ||
| 852 | #~(begin | ||
| 853 | ;; Unbundle ruamel. | ||
| 854 | (delete-file-recursively "strictyaml/ruamel"))))) | ||
| 850 | (build-system pyproject-build-system) | 855 | (build-system pyproject-build-system) |
| 851 | (propagated-inputs (list python-dateutil python-ruamel.yaml)) | 856 | (arguments |
| 852 | (native-inputs (list python-setuptools python-wheel)) | 857 | (list |
| 853 | (home-page "https://pypi.org/project/strictyaml/") | 858 | ;; XXX: Tests require running Docker and an external test framework, |
| 859 | ;; see: <https://github.com/crdoconnor/strictyaml/blob/1.7.3/key.sh> | ||
| 860 | #:tests? #f | ||
| 861 | #:phases | ||
| 862 | #~(modify-phases %standard-phases | ||
| 863 | (add-after 'unpack 'remove-bundled-ruamel | ||
| 864 | (lambda _ | ||
| 865 | (substitute* "pyproject.toml" | ||
| 866 | ((", \"strictyaml.ruamel\"") | ||
| 867 | "") | ||
| 868 | (("\"python-dateutil>=2.6.0\"" dateutils) | ||
| 869 | (string-append dateutils ", \"ruamel.yaml\""))) | ||
| 870 | (substitute* "strictyaml/parser.py" | ||
| 871 | (("from strictyaml import ruamel") | ||
| 872 | "import ruamel.yaml")) | ||
| 873 | (substitute* (find-files "." "\\.py$") | ||
| 874 | (("from strictyaml.ruamel") | ||
| 875 | "from ruamel.yaml"))))))) | ||
| 876 | (native-inputs | ||
| 877 | (list python-setuptools)) | ||
| 878 | (propagated-inputs | ||
| 879 | (list python-dateutil | ||
| 880 | python-ruamel.yaml-0.16)) | ||
| 881 | (home-page "https://hitchdev.com/strictyaml/") | ||
| 854 | (synopsis "Strict, typed YAML parser") | 882 | (synopsis "Strict, typed YAML parser") |
| 855 | (description "StrictYAML is a type-safe YAML parser that parses and | 883 | (description "StrictYAML is a type-safe YAML parser that parses and |
| 856 | validates a restricted subset of the YAML specification.") | 884 | validates a restricted subset of the YAML specification.") |
