%global srcname oyaml Name: python-%{srcname} Version: 1.0 Release: 1%{?dist} Summary: Ordered YAML: drop-in replacement for PyYAML that preserves dict ordering License: MIT URL: https://github.com/wimglenn/oyaml # The GitHub tag, not the sdist: the sdist leaves out test_oyaml.py. Source: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check BuildRequires: python3-pytest %global _description %{expand: oyaml is a one-file wrapper around PyYAML. Mappings are loaded into and dumped from dicts in insertion order, which on Python 3.7 and later is what a plain dict already keeps, so the module reduces to re-exporting PyYAML with a loader and dumper that treat key order as significant. Import it in place of yaml.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check # Seven of upstream's 20 cases call yaml.load(text) and yaml.load_all(text) # with no Loader. PyYAML 6 made Loader a required argument, so those tests # raise TypeError before reaching oyaml; the module itself only re-exports # PyYAML's functions and registers its constructor, and every case that passes # a loader, plus all the dump cases, pass. Upstream's last release is 1.0 # (2018), and the tests were not updated. %pytest -q \ --deselect test_oyaml.py::test_load \ --deselect test_oyaml.py::test_load_all \ --deselect test_oyaml.py::test_loads_to_std_dict \ --deselect test_oyaml.py::test_anchors_and_references \ --deselect test_oyaml.py::test_omap \ --deselect test_oyaml.py::test_omap_flow_style \ --deselect test_oyaml.py::test_merge %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %changelog * Fri Oct 23 2026 Morgan Hough - 1.0-1 - Initial package: oyaml 1.0 (MIT, per LICENSE). Net-new to Fedora; required by mkstd, which is what libssr's EFECT report writer needs. - Built from the GitHub tag for its tests. %%check on f44 (PyYAML 6.0.3): 11 pass, 2 skip, 7 deselected for calling yaml.load() with no Loader, which PyYAML 6 rejects; none fail.