|
|
dda3cef |
Name: python-strictyaml
|
|
|
9986494 |
Version: 1.6.2
|
|
|
f51bc56 |
Release: %autorelease
|
|
|
82c2df0 |
Summary: Parses and validates a restricted subset of YAML
|
|
|
82c2df0 |
|
|
|
263a0c9 |
# SPDX
|
|
|
82c2df0 |
License: MIT
|
|
|
dda3cef |
URL: http://hitchdev.com/strictyaml
|
|
|
d6f8fb0 |
%global forgeurl https://github.com/crdoconnor/strictyaml
|
|
|
9986494 |
Source0: %{forgeurl}/archive/%{version}/strictyaml-%{version}.tar.gz
|
|
|
db97c28 |
# https://github.com/crdoconnor/strictyaml/issues/152
|
|
|
db97c28 |
Source1: https://sourceforge.net/p/ruamel-yaml/code/ci/0.16.13/tree/LICENSE?format=raw#/LICENSE-ruamel-yaml
|
|
|
82c2df0 |
|
|
|
82c2df0 |
BuildArch: noarch
|
|
|
82c2df0 |
|
|
|
82c2df0 |
BuildRequires: python3-devel
|
|
|
82c2df0 |
|
|
|
82c2df0 |
# We do not attempt to build the documentation, since it requires an
|
|
|
82c2df0 |
# idiosyncratic build system (see https://hitchdev.com/) that is hopelessly
|
|
|
82c2df0 |
# entangled with the idea of downloading dependencies from PyPI. An offline
|
|
|
82c2df0 |
# build would be nearly impossible.
|
|
|
82c2df0 |
|
|
|
82c2df0 |
%global common_description %{expand:
|
|
|
82c2df0 |
StrictYAML is a type-safe YAML parser that parses and validates a restricted
|
|
|
82c2df0 |
subset of the YAML specification.
|
|
|
82c2df0 |
|
|
|
82c2df0 |
Priorities:
|
|
|
82c2df0 |
|
|
|
82c2df0 |
• Beautiful API
|
|
|
82c2df0 |
• Refusing to parse the ugly, hard to read and insecure features of YAML like
|
|
|
82c2df0 |
the Norway problem.
|
|
|
82c2df0 |
• Strict validation of markup and straightforward type casting.
|
|
|
82c2df0 |
• Clear, readable exceptions with code snippets and line numbers.
|
|
|
82c2df0 |
• Acting as a near-drop in replacement for pyyaml, ruamel.yaml or poyo.
|
|
|
82c2df0 |
• Ability to read in YAML, make changes and write it out again with comments
|
|
|
82c2df0 |
preserved.
|
|
|
82c2df0 |
• Not speed, currently.}
|
|
|
82c2df0 |
|
|
|
82c2df0 |
%description %{common_description}
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
dda3cef |
%package -n python3-strictyaml
|
|
|
82c2df0 |
Summary: %{summary}
|
|
|
82c2df0 |
|
|
|
db97c28 |
# Upstream bundled/vendored a slightly older version of ruamel.yaml after an
|
|
|
db97c28 |
# update with API changes was too difficult to support. This is intended to be
|
|
|
db97c28 |
# a temporary workaround until the vendored library can be replaced with a
|
|
|
db97c28 |
# custom parser for StrictYAML. See
|
|
|
db97c28 |
# https://github.com/crdoconnor/strictyaml/issues/151 for discussion, and
|
|
|
db97c28 |
# strictyaml/ruamel/__init__.py for version information.
|
|
|
db97c28 |
Provides: bundled(python3dist(ruamel-yaml)) = 0.16.13
|
|
|
db97c28 |
|
|
|
dda3cef |
%description -n python3-strictyaml %{common_description}
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
82c2df0 |
%prep
|
|
|
d6f8fb0 |
%autosetup -n strictyaml-%{version}
|
|
|
db97c28 |
cp -p '%{SOURCE1}' .
|
|
|
95b0cbd |
# Upstream’s idiosyncratic build system normally handles this:
|
|
|
95b0cbd |
sed -r -i 's/(__version__ *= *")DEVELOPMENT_VERSION"/\1%{version}"/' \
|
|
|
95b0cbd |
'strictyaml/__init__.py'
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
ab92d19 |
%generate_buildrequires
|
|
|
9986494 |
%pyproject_buildrequires
|
|
|
ab92d19 |
|
|
|
ab92d19 |
|
|
|
82c2df0 |
%build
|
|
|
a7e01f7 |
%pyproject_wheel
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
82c2df0 |
%install
|
|
|
a7e01f7 |
%pyproject_install
|
|
|
dda3cef |
%pyproject_save_files strictyaml
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
212207e |
%check
|
|
|
82c2df0 |
# There are no tests. (If there were, it would be as hard to run them as it is
|
|
|
0939887 |
# to build the documentation.) We therefore do an import-only “smoke test.” We
|
|
|
0939887 |
# must skip one module in the bundled ruamel-yaml because it does not include
|
|
|
0939887 |
# the compiled C extension (_ruamel_yaml).
|
|
|
015fa93 |
#
|
|
|
015fa93 |
# We would prefer to use:
|
|
|
015fa93 |
# %%pyproject_check_import -e strictyaml.ruamel.cyaml
|
|
|
015fa93 |
# but this is not yet available in EPEL9.
|
|
|
015fa93 |
%{py3_check_import strictyaml
|
|
|
015fa93 |
strictyaml.any_validator
|
|
|
015fa93 |
strictyaml.compound
|
|
|
015fa93 |
strictyaml.constants
|
|
|
015fa93 |
strictyaml.dumper
|
|
|
015fa93 |
strictyaml.exceptions
|
|
|
015fa93 |
strictyaml.parser
|
|
|
015fa93 |
strictyaml.representation
|
|
|
015fa93 |
strictyaml.ruamel
|
|
|
015fa93 |
strictyaml.ruamel.anchor
|
|
|
015fa93 |
strictyaml.ruamel.comments
|
|
|
015fa93 |
strictyaml.ruamel.compat
|
|
|
015fa93 |
strictyaml.ruamel.composer
|
|
|
015fa93 |
strictyaml.ruamel.configobjwalker
|
|
|
015fa93 |
strictyaml.ruamel.constructor
|
|
|
015fa93 |
strictyaml.ruamel.dumper
|
|
|
015fa93 |
strictyaml.ruamel.emitter
|
|
|
015fa93 |
strictyaml.ruamel.error
|
|
|
015fa93 |
strictyaml.ruamel.events
|
|
|
015fa93 |
strictyaml.ruamel.loader
|
|
|
015fa93 |
strictyaml.ruamel.main
|
|
|
015fa93 |
strictyaml.ruamel.nodes
|
|
|
015fa93 |
strictyaml.ruamel.parser
|
|
|
015fa93 |
strictyaml.ruamel.reader
|
|
|
015fa93 |
strictyaml.ruamel.representer
|
|
|
015fa93 |
strictyaml.ruamel.resolver
|
|
|
015fa93 |
strictyaml.ruamel.scalarbool
|
|
|
015fa93 |
strictyaml.ruamel.scalarfloat
|
|
|
015fa93 |
strictyaml.ruamel.scalarint
|
|
|
015fa93 |
strictyaml.ruamel.scalarstring
|
|
|
015fa93 |
strictyaml.ruamel.scanner
|
|
|
015fa93 |
strictyaml.ruamel.serializer
|
|
|
015fa93 |
strictyaml.ruamel.timestamp
|
|
|
015fa93 |
strictyaml.ruamel.tokens
|
|
|
015fa93 |
strictyaml.ruamel.util
|
|
|
015fa93 |
strictyaml.scalar
|
|
|
015fa93 |
strictyaml.utils
|
|
|
015fa93 |
strictyaml.validators
|
|
|
015fa93 |
strictyaml.yamllocation
|
|
|
015fa93 |
strictyaml.yamlpointer}
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
dda3cef |
%files -n python3-strictyaml -f %{pyproject_files}
|
|
|
82c2df0 |
%doc CHANGELOG.md
|
|
|
82c2df0 |
%doc README.md
|
|
|
82c2df0 |
|
|
|
82c2df0 |
|
|
|
82c2df0 |
%changelog
|
|
|
f51bc56 |
%autochangelog
|