Compare commits

..

No commits in common. "rawhide" and "f40" have entirely different histories.

8 changed files with 15 additions and 59 deletions

View file

@ -1 +0,0 @@
1

2
.gitignore vendored
View file

@ -1,2 +1,2 @@
/*.tar.xz
/*.tar.gz
/*.zip

View file

@ -1,6 +0,0 @@
summary: Run CI tests
discover:
how: fmf
execute:
how: tmt

View file

@ -1,8 +1,10 @@
# Breaks the circular dependency with ruamel.yaml.clib.
%bcond_with bootstrap
%global commit 6f41eb6001661917fceb0e88ed0693ae1a7c50f4
Name: python-ruamel-yaml
Version: 0.19.1
Version: 0.18.6
Release: %autorelease
Summary: YAML 1.2 loader/dumper package for Python
@ -10,7 +12,7 @@ Summary: YAML 1.2 loader/dumper package for Python
License: MIT
URL: https://sourceforge.net/projects/ruamel-yaml
# The PyPI sdist does not contain tests, so we use a snapshot from SourceForge
Source: https://yaml.dev/ruamel-dl-tagged-releases/ruamel.yaml-%{version}.tar.xz
Source: https://sourceforge.net/code-snapshots/hg/r/ru/ruamel-yaml/code/ruamel-yaml-code-%{commit}.zip
BuildArch: noarch
@ -28,19 +30,20 @@ BuildRequires: python3-pytest
%py_provides python3-ruamel.yaml
%if !%{with bootstrap}
# ruamel.yaml.clibz is not available in Fedora (and probably never will
# be), so require the old clib backend
Requires: python3-ruamel-yaml+oldlibyaml = %{version}-%{release}
%endif
%description -n python3-ruamel-yaml %{_description}
%prep
%autosetup -n ruamel.yaml-%{version}
%autosetup -n ruamel-yaml-code-%{commit}
# Upstream upper-bounds the Python interpeter versions with which the C
# implementation (ruamel.yaml.clib dependency) may be used. Patch this out.
sed -r -i 's/( and python_version<"[^"]+")(.*ruamel\.yaml\.clib)/\2/' \
__init__.py
%if %{with bootstrap}
sed -r -i 's/^([[:blank:]]*)(.*ruamel\.yaml\.clib)/\1# \2/' __init__.py
%endif
%generate_buildrequires
%pyproject_buildrequires %{!?with_bootstrap:-x oldlibyaml}
%pyproject_buildrequires
%build
%pyproject_wheel
@ -62,7 +65,5 @@ k="${k-}${k+ and }not test_dump_cyaml_1_2"
%files -n python3-ruamel-yaml -f %{pyproject_files}
%doc README.md
%pyproject_extras_subpkg -n python3-ruamel-yaml oldlibyaml
%changelog
%autochangelog

View file

@ -1 +1 @@
SHA512 (ruamel.yaml-0.19.1.tar.xz) = bf9eb8e40f506d6f3f34aee5f5ec74eb93bfda2b27022f6ad62dfac724b9e0847d61e3159d284bada7dec147992aaf509804f7139818de5bc85aa328bc32601f
SHA512 (ruamel-yaml-code-6f41eb6001661917fceb0e88ed0693ae1a7c50f4.zip) = 49fc9ef87e59b723803659300a8dc2c33d596bc2e1effa5235f26cf51fb08c0e6e0d2c386d54c290f97d63dc2a8956802a02c90e4a52881a2cd5d38daf1b0318

View file

@ -1 +0,0 @@
component: python-ruamel-yaml

View file

@ -1,5 +0,0 @@
summary: Regression test for upstream ticket 534
require: python3-ruamel-yaml
link:
- verifies: https://sourceforge.net/p/ruamel-yaml/tickets/534/
test: python3 test.py

View file

@ -1,32 +0,0 @@
# Taken from https://sourceforge.net/p/ruamel-yaml/tickets/534/
from io import StringIO
from ruamel.yaml import YAML
original = '0: foo\n'
py_original = {0: 'foo'}
prefix = '%YAML 1.1\n---\n'
yaml = YAML()
yaml.version = (1, 1)
loaded = yaml.load(original)
assert loaded == py_original
print('Fresh')
stream = StringIO()
yaml.dump(py_original, stream)
fresh = stream.getvalue()
print(fresh)
assert fresh.startswith(prefix)
trimmed = fresh[len(prefix):]
assert trimmed == original, f"{trimmed!r} != {original!r}"
print('Round trip')
stream = StringIO()
yaml.dump(loaded, stream)
round_tripped = stream.getvalue()
print(round_tripped)
assert round_tripped.startswith(prefix)
trimmed = round_tripped[len(prefix):]
assert trimmed == original, f"{trimmed!r} != {original!r}"