diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index e28cffa..bda4ca0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -/*.tar.xz -/*.zip +/ruamel.yaml-0.12.14.tar.gz +/ruamel-yaml-0.12.14.tar.gz +/ruamel-yaml-0.13.13.tar.gz +/ruamel-yaml-0.13.14.tar.gz diff --git a/changelog b/changelog deleted file mode 100644 index 2179505..0000000 --- a/changelog +++ /dev/null @@ -1,185 +0,0 @@ -* Fri Jul 19 2024 Fedora Release Engineering - 0.18.5-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 0.18.5-5 -- Rebuilt for Python 3.13 - -* Fri Jun 07 2024 Python Maint - 0.18.5-4 -- Bootstrap for Python 3.13 - -* Fri Jan 26 2024 Fedora Release Engineering - 0.18.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 0.18.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Nov 12 2023 Parag Nemade - 0.18.5-1 -- Update to 0.18.5 - -* Thu Oct 26 2023 Joel Capitao - 0.18.2-1 -- Update to 0.18.2 (close RHBZ#2245968) - -* Tue Oct 24 2023 Joel Capitao - 0.18.1-1 -- Update to 0.18.1 (close RHBZ#2241174) - -* Fri Jul 21 2023 Fedora Release Engineering - 0.17.32-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jun 22 2023 Python Maint - 0.17.32-2 -- Rebuilt for Python 3.12 - -* Mon Jun 19 2023 Joel Capitao - 0.17.32-1 -- Update to 0.17.32 (close RHBZ#2210057) - -* Wed Jun 14 2023 Python Maint - 0.17.26-4 -- Rebuilt for Python 3.12 - -* Wed Jun 14 2023 Python Maint - 0.17.26-3 -- Bootstrap for Python 3.12 - -* Wed May 24 2023 Yaakov Selkowitz - 0.17.26-2 -- Avoid tox dependency - -* Tue May 09 2023 Fedora Release Monitoring - 0.17.26-1 -- Update to 0.17.26 (close RHBZ#2196655) - -* Sun May 07 2023 Benjamin A. Beasley - 0.17.24-1 -- Update to 0.17.24 (close RHBZ#2193478) - -* Thu May 04 2023 Benjamin A. Beasley - 0.17.22-2 -- Confirm License is SPDX MIT -- Reduce macro indirection and drop ancient constructs and conditionals -- Update description from upstream -- Make the package noarch (python-ruamel-yaml-clib contains the compiled code) -- Fix upper-bounded Python interpreter version for ruamel.yaml.clib dependency -- Drop unused manual runtime dependency on setuptools -- Port to pyproject-rpm-macros (“new Python guidelines”) -- Stop numbering the source archive -- Add a bootstrap conditional to break the circular dependency with - ruamel.yaml.clib -- Fix an obsolete comment referring to bitbucket - -* Wed May 03 2023 Maxwell G - 0.17.22-1 -- Update to 0.17.22. Fixes rhbz#2192464. - -* Fri Jan 20 2023 Fedora Release Engineering - 0.17.21-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 0.17.21-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.17.21-2 -- Rebuilt for Python 3.11 - -* Tue May 10 2022 Jakub Čajka - 0.17.21-1 -- Update to 0.17.21 -- Related: BZ#2042422 - -* Fri Jan 21 2022 Fedora Release Engineering - 0.16.6-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 0.16.6-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.16.6-7 -- Rebuilt for Python 3.10 - -* Mon Feb 22 2021 Joel Capitao - 0.16.6-6 -- Change upstream URL -- Remove obsolete patch - -* Wed Jan 27 2021 Fedora Release Engineering - 0.16.6-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 0.16.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 0.16.6-3 -- Rebuilt for Python 3.9 - -* Thu Jan 30 2020 Fedora Release Engineering - 0.16.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Jan 20 2020 Jason Montleon - 0.16.6-1 -- Update to 0.16.6 - -* Thu Oct 03 2019 Miro Hrončok - 0.16.5-3 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Fri Aug 30 2019 Chandan Kumar - 0.16.5-2 -- Added ruamel-yaml-clib as Requires - -* Tue Aug 27 2019 Chedi Toueiti - 0.16.5-1 -- Update to 0.16.5 - -* Mon Aug 19 2019 Miro Hrončok - 0.15.41-6 -- Rebuilt for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 0.15.41-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 0.15.41-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 14 2019 Miro Hrončok - 0.15.41-3 -- Subpackage python2-ruamel-yaml has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Sat Jul 14 2018 Fedora Release Engineering - 0.15.41-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Jun 29 2018 Miro Hrončok - 0.15.41-1 -- Update to 0.15.41 -- Add patch not to require ruamel.std.pathlib - -* Tue Jun 19 2018 Miro Hrončok - 0.13.14-4 -- Rebuilt for Python 3.7 - -* Fri Feb 09 2018 Iryna Shcherbina - 0.13.14-3 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Fri Feb 09 2018 Fedora Release Engineering - 0.13.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 9 2017 Orion Poplawski - 0.13.14-1 -- Update to 0.13.14 - -* Thu Aug 03 2017 Fedora Release Engineering - 0.13.13-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 0.13.13-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon Feb 13 2017 Jan Chaloupka - 0.13.13-3 -- The ruamel.yaml needs at least typing >= 3.5.2.2 - related: #1386563 - -* Sat Feb 11 2017 Fedora Release Engineering - 0.13.13-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jan 31 2017 Orion Poplawski - 0.13.13-1 -- Update to 0.13.13 - -* Tue Jan 31 2017 Orion Poplawski - 0.12.14-7 -- Add patch to support pytest 2.7 in EPEL7 - -* Mon Dec 19 2016 Miro Hrončok - 0.12.14-6 -- Rebuild for Python 3.6 - -* Wed Oct 26 2016 Orion Poplawski - 0.12.14-5 -- Require python34-typing on EPEL -- Ignore python2 test failure due to old pytest on EPEL7 - -* Wed Oct 26 2016 Orion Poplawski - 0.12.14-4 -- Build python3 package -- Run tests - -* Tue Oct 25 2016 Chandan Kumar - 0.12.14-3 -- Disabling python3 as python3-ruamel-ordereddict not available - -* Mon Oct 24 2016 Chandan Kumar - 0.12.14-2 -- Fixed python2-typing runtime dependency issue - -* Fri Oct 14 2016 Chandan Kumar - 0.12.14-1 -- Initial package. diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index d890aec..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: Run CI tests -discover: - how: fmf -execute: - how: tmt - diff --git a/python-ruamel-yaml-pytest27.patch b/python-ruamel-yaml-pytest27.patch new file mode 100644 index 0000000..816ccb7 --- /dev/null +++ b/python-ruamel-yaml-pytest27.patch @@ -0,0 +1,19 @@ +diff -up ruamel-yaml-171c3653fc01/_test/test_anchor.py.pytest27 ruamel-yaml-171c3653fc01/_test/test_anchor.py +--- ruamel-yaml-171c3653fc01/_test/test_anchor.py.pytest27 2016-09-21 02:09:18.000000000 -0600 ++++ ruamel-yaml-171c3653fc01/_test/test_anchor.py 2017-01-31 15:25:09.245847125 -0700 +@@ -5,6 +5,7 @@ testing of anchors and the aliases refer + """ + + import pytest ++from distutils.version import LooseVersion + from textwrap import dedent + import platform + +@@ -231,6 +232,7 @@ class TestAnchorsAliases: + """) + + # this is an error in PyYAML ++ @pytest.mark.skipif(LooseVersion(pytest.__version__) < LooseVersion("2.8"), reason="Need pytest 2.7") + def test_reused_anchor(self): + yaml = ''' + - &a diff --git a/python-ruamel-yaml.spec b/python-ruamel-yaml.spec index 93c571e..a158f72 100644 --- a/python-ruamel-yaml.spec +++ b/python-ruamel-yaml.spec @@ -1,68 +1,157 @@ -# Breaks the circular dependency with ruamel.yaml.clib. -%bcond_with bootstrap +%global pypi_name ruamel.yaml +%global pname ruamel-yaml +%global commit f29921d2048e -Name: python-ruamel-yaml -Version: 0.19.1 -Release: %autorelease -Summary: YAML 1.2 loader/dumper package for Python +%global with_python3 1 + +Name: python-%{pname} +Version: 0.13.14 +Release: 2%{?dist} +Summary: YAML 1.2 loader/dumper package for Python -# SPDX 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 +URL: https://bitbucket.org/ruamel/yaml +#Source0: https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +# Use bitbucket sources so we can run the tests +Source0: https://bitbucket.org/ruamel/yaml/get/%{version}.tar.gz#/%{pname}-%{version}.tar.gz +# Works with pytest 2.7 +Patch0: python-ruamel-yaml-pytest27.patch + +BuildRequires: libyaml-devel -BuildArch: noarch +%description +ruamel.yaml is a YAML 1.2 loader/dumper package for Python. +It is a derivative of Kirill Simonov’s PyYAML 3.11 -%global _description %{expand: -ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of -comments, seq/map flow style, and map key order.} +%package -n python2-%{pname} +Summary: YAML 1.2 loader/dumper package for Python +BuildRequires: python2-devel +BuildRequires: python-setuptools +# For tests +BuildRequires: pytest +BuildRequires: python2-ruamel-ordereddict +BuildRequires: python2-typing >= 3.5.2.2-2 +%{?python_provide:%python_provide python2-%{pypi_name}} + +Requires: python2-ruamel-ordereddict +Requires: python2-typing >= 3.5.2.2-2 +Requires: python-setuptools -%description %{_description} +%description -n python2-%{pname} +ruamel.yaml is a YAML 1.2 loader/dumper package for Python. +It is a derivative of Kirill Simonov’s PyYAML 3.11 -%package -n python3-ruamel-yaml -Summary: YAML 1.2 loader/dumper package for Python +%if 0%{?with_python3} +%package -n python%{python3_pkgversion}-%{pname} +Summary: YAML 1.2 loader/dumper package for Python +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +# For tests +BuildRequires: python%{python3_pkgversion}-pytest +# typing was added in Python 3.5 +%if %{python3_pkgversion} == 34 +BuildRequires: python%{python3_pkgversion}-typing +%endif +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -BuildRequires: python3-devel -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} +Requires: python%{python3_pkgversion}-setuptools +%if %{python3_pkgversion} == 34 +Requires: python%{python3_pkgversion}-typing %endif -%description -n python3-ruamel-yaml %{_description} +%description -n python%{python3_pkgversion}-%{pname} +ruamel.yaml is a YAML 1.2 loader/dumper package for Python. +It is a derivative of Kirill Simonov’s PyYAML 3.11 +%endif %prep -%autosetup -n ruamel.yaml-%{version} - -%generate_buildrequires -%pyproject_buildrequires %{!?with_bootstrap:-x oldlibyaml} +%autosetup -n %{pname}-%{commit} -p1 +rm -rf %{pypi_name}.egg-info %build -%pyproject_wheel +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%pyproject_install -# RFE: Add option for namespace packages to %%pyproject_save_files -# https://bugzilla.redhat.com/show_bug.cgi?id=1935266 -%pyproject_save_files -l ruamel +%if 0%{?with_python3} +%{__python3} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT +%endif + +%{__python2} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT %check -%if %{with bootstrap} -k="${k-}${k+ and }not test_load_cyaml" -k="${k-}${k+ and }not test_load_cyaml_1_2" -k="${k-}${k+ and }not test_dump_cyaml_1_2" +%ifarch aarch64 +# Appears to fail in pytest on aarch64 for some reason +PYTHONPATH=$(echo build/lib.*%{python2_version}) py.test-%{python2_version} _test/test_*.py || : +%else +PYTHONPATH=$(echo build/lib.*%{python2_version}) py.test-%{python2_version} _test/test_*.py +%endif +%if 0%{?with_python3} +PYTHONPATH=$(echo build/lib.*%{python3_version}) py.test-%{python3_version} _test/test_*.py %endif -%pytest -k "${k-}" _test/test_*.py -%files -n python3-ruamel-yaml -f %{pyproject_files} -%doc README.md +%files -n python2-%{pname} +%license LICENSE +%doc README.rst +%{python2_sitearch}/ruamel +%{python2_sitearch}/_ruamel_yaml.so +%{python2_sitearch}/%{pypi_name}-%{version}-py?.?-*.pth +%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info -%pyproject_extras_subpkg -n python3-ruamel-yaml oldlibyaml +%if 0%{?with_python3} +%files -n python%{python3_pkgversion}-%{pname} +%license LICENSE +%doc README.rst +%{python3_sitearch}/ruamel +%{python3_sitearch}/_ruamel_yaml.cpython-* +%{python3_sitearch}/%{pypi_name}-%{version}-py?.?-*.pth +%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info +%endif %changelog -%autochangelog +* Fri Mar 08 2019 Troy Dawson - 0.13.14-2 +- Rebuilt to change main python from 3.4 to 3.6 + +* Wed Aug 9 2017 Orion Poplawski - 0.13.14-1 +- Update to 0.13.14 + +* Thu Aug 03 2017 Fedora Release Engineering - 0.13.13-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.13.13-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Feb 13 2017 Jan Chaloupka - 0.13.13-3 +- The ruamel.yaml needs at least typing >= 3.5.2.2 + related: #1386563 + +* Sat Feb 11 2017 Fedora Release Engineering - 0.13.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 31 2017 Orion Poplawski - 0.13.13-1 +- Update to 0.13.13 + +* Tue Jan 31 2017 Orion Poplawski - 0.12.14-7 +- Add patch to support pytest 2.7 in EPEL7 + +* Mon Dec 19 2016 Miro Hrončok - 0.12.14-6 +- Rebuild for Python 3.6 + +* Wed Oct 26 2016 Orion Poplawski - 0.12.14-5 +- Require python34-typing on EPEL +- Ignore python2 test failure due to old pytest on EPEL7 + +* Wed Oct 26 2016 Orion Poplawski - 0.12.14-4 +- Build python3 package +- Run tests + +* Tue Oct 25 2016 Chandan Kumar - 0.12.14-3 +- Disabling python3 as python3-ruamel-ordereddict not available + +* Mon Oct 24 2016 Chandan Kumar - 0.12.14-2 +- Fixed python2-typing runtime dependency issue + +* Fri Oct 14 2016 Chandan Kumar - 0.12.14-1 +- Initial package. diff --git a/sources b/sources index f0e723c..dd40aa4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruamel.yaml-0.19.1.tar.xz) = bf9eb8e40f506d6f3f34aee5f5ec74eb93bfda2b27022f6ad62dfac724b9e0847d61e3159d284bada7dec147992aaf509804f7139818de5bc85aa328bc32601f +SHA512 (ruamel-yaml-0.13.14.tar.gz) = 3701cb76a8297bc42070b55a204d41d37c813ab0685c67ae55959b4fd763d5608d79b10532af24168e53b1d5de79beeb4c57530275973fb1950ee8f61f7f4abc diff --git a/tests/main.fmf b/tests/main.fmf deleted file mode 100644 index 1cfafe2..0000000 --- a/tests/main.fmf +++ /dev/null @@ -1 +0,0 @@ -component: python-ruamel-yaml diff --git a/tests/sf534/main.fmf b/tests/sf534/main.fmf deleted file mode 100644 index 5480ac5..0000000 --- a/tests/sf534/main.fmf +++ /dev/null @@ -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 diff --git a/tests/sf534/test.py b/tests/sf534/test.py deleted file mode 100644 index 8302605..0000000 --- a/tests/sf534/test.py +++ /dev/null @@ -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}"