Compare commits

...
Sign in to create a new pull request.

15 commits

Author SHA1 Message Date
Ondrej Mosnáček
cdec57db9d
Update to version 0.19.1 (fedora#2426465)
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2026-01-05 17:24:24 +01:00
Ondrej Mosnáček
d39270652a
Update to version 0.18.17 (fedora#2423406)
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2025-12-18 08:58:54 +01:00
Ondrej Mosnáček
b7baece53f
Update to version 0.18.16 (fedora#2405874)
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2025-10-23 08:50:25 +02:00
Python Maint
dbfc5f0666 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:22:49 +02:00
Ondrej Mosnáček
7e8dc99058
Update to version 0.18.15 (fedora#2389387)
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2025-08-19 14:55:53 +02:00
Python Maint
a45b1d803f Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 14:47:54 +02:00
Fedora Release Engineering
b9a3871a83 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 10:16:32 +00:00
Ondrej Mosnáček
209e8e8f4a
Update to version 0.18.14 (fedora#2368448)
Also pull tarballs from https://yaml.dev/, which is referenced in
CHANGES as an additional official source.

Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2025-06-11 10:18:36 +02:00
Python Maint
4236d32316 Rebuilt for Python 3.14 2025-06-02 23:35:06 +02:00
Python Maint
c7cb48c9c1 Bootstrap for Python 3.14 2025-06-02 22:53:51 +02:00
Fedora Release Engineering
829e0922a3 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 19:03:17 +00:00
Ondrej Mosnáček
f4ffb1b349
Update to version 0.18.10 (fedora#2334967)
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2025-01-06 15:33:53 +01:00
Ondrej Mosnáček
6399b356b8
Add TMT test for upstream ticket 534
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2025-01-05 19:04:57 +01:00
Miro Hrončok
7ce90a3638 Fix the bootstrap build
- Related: rhbz#2323169

The problem this fixes is a bit complex.

It goes like this:

 1.  %pyproject_buildrequires runs for the first time.
     There is no pyproject.toml, only setup.py, so a dependency on setuptools is generated.
     A build dependency on wheel is not generated (as it is not needed on Fedora 42+).
 2.  %pyproject_buildrequires runs again.
     There is no pyproject.toml, only setup.py, so it is used.
     A build dependency on wheel is still not generated.
     A build dependency on ruamel-yaml-clib is generated when building without bootstrap,
     as it is a runtime dependency.
     Here it comes: setup.py code creates a pyproject.toml file (with a dependency on wheel) 😱
 3a. Without bootstrap, dnf installs ruamel-yaml-clib and %%pyproject_buildrequires runs once more.
     It uses pyproject.toml (which now exists).
     A build dependency on wheel is now generated and %pyproject_buildrequires runs once more,
     dnf install wheel.
 3b. With bootstrap, this step is skipped as there was no new dependency (on ruamel-yaml-clib) to trigger it.
 4.  The final (verification) %pyproject_buildrequires round uses pyproject.toml (which now exists).
     Without bootstrap, all is fine, no new dependency is generated.
     With bootstrap, the wheel dependency is generated for the first time,
     but at this point, it fails rpmbuild (because missing dependencies now fail the build).

We see errors like this as a result:

    error: Failed build dependencies:
        python3dist(wheel) is needed by python-ruamel-yaml-0.18.6-2.fc42~bootstrap.noarch

Considering the wheel dependency is entirely unneeded I proposed removal for upstream.

An alternative solution is to rm -f pyproject.toml
before calling %pyproject_buildrequires in %generate_buildrequires.
But if upstream switches to a proper pyproject.toml, we might not notice that.
2024-12-02 15:04:47 +01:00
Miro Hrončok
b8c60a3bec Fix build with Python 3.14
- Fixes: rhzb#2323169
2024-12-02 15:04:04 +01:00
8 changed files with 59 additions and 15 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

2
.gitignore vendored
View file

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

6
plans/ci.fmf Normal file
View file

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

View file

@ -1,10 +1,8 @@
# Breaks the circular dependency with ruamel.yaml.clib.
%bcond_with bootstrap
%global commit 6f41eb6001661917fceb0e88ed0693ae1a7c50f4
Name: python-ruamel-yaml
Version: 0.18.6
Version: 0.19.1
Release: %autorelease
Summary: YAML 1.2 loader/dumper package for Python
@ -12,7 +10,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://sourceforge.net/code-snapshots/hg/r/ru/ruamel-yaml/code/ruamel-yaml-code-%{commit}.zip
Source: https://yaml.dev/ruamel-dl-tagged-releases/ruamel.yaml-%{version}.tar.xz
BuildArch: noarch
@ -30,20 +28,19 @@ 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-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
%autosetup -n ruamel.yaml-%{version}
%generate_buildrequires
%pyproject_buildrequires
%pyproject_buildrequires %{!?with_bootstrap:-x oldlibyaml}
%build
%pyproject_wheel
@ -65,5 +62,7 @@ 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-code-6f41eb6001661917fceb0e88ed0693ae1a7c50f4.zip) = 49fc9ef87e59b723803659300a8dc2c33d596bc2e1effa5235f26cf51fb08c0e6e0d2c386d54c290f97d63dc2a8956802a02c90e4a52881a2cd5d38daf1b0318
SHA512 (ruamel.yaml-0.19.1.tar.xz) = bf9eb8e40f506d6f3f34aee5f5ec74eb93bfda2b27022f6ad62dfac724b9e0847d61e3159d284bada7dec147992aaf509804f7139818de5bc85aa328bc32601f

1
tests/main.fmf Normal file
View file

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

5
tests/sf534/main.fmf Normal file
View file

@ -0,0 +1,5 @@
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

32
tests/sf534/test.py Normal file
View file

@ -0,0 +1,32 @@
# 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}"