Compare commits
No commits in common. "c8s" and "c9-beta" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
/ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2.zip
|
SOURCES/ruamel-yaml-0.16.6.tar.gz
|
||||||
|
1
.python-ruamel-yaml.metadata
Normal file
1
.python-ruamel-yaml.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
c30a00468467ce71752aab302ab826a3aca10c42 SOURCES/ruamel-yaml-0.16.6.tar.gz
|
63
SOURCES/python-ruamel-yaml-pathlib.patch
Normal file
63
SOURCES/python-ruamel-yaml-pathlib.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
diff --git a/_doc/conf.py b/_doc/conf.py
|
||||||
|
--- a/_doc/conf.py
|
||||||
|
+++ b/_doc/conf.py
|
||||||
|
@@ -75,7 +75,10 @@
|
||||||
|
if False:
|
||||||
|
try:
|
||||||
|
from ryd.__main__ import RYDCmd
|
||||||
|
- from ruamel.std.pathlib import Path
|
||||||
|
+ try:
|
||||||
|
+ from pathlib import Path
|
||||||
|
+ except ImportError:
|
||||||
|
+ from pathlib2 import Path
|
||||||
|
|
||||||
|
oldargv = sys.argv
|
||||||
|
for fn in Path('.').glob('*.ryd'):
|
||||||
|
diff --git a/_test/roundtrip.py b/_test/roundtrip.py
|
||||||
|
--- a/_test/roundtrip.py
|
||||||
|
+++ b/_test/roundtrip.py
|
||||||
|
@@ -7,7 +7,11 @@
|
||||||
|
"""
|
||||||
|
import sys
|
||||||
|
import textwrap
|
||||||
|
-from ruamel.std.pathlib import Path
|
||||||
|
+try:
|
||||||
|
+ from pathlib import Path
|
||||||
|
+except ImportError:
|
||||||
|
+ from pathlib2 import Path
|
||||||
|
+
|
||||||
|
|
||||||
|
enforce = object()
|
||||||
|
|
||||||
|
diff --git a/_test/test_api_change.py b/_test/test_api_change.py
|
||||||
|
--- a/_test/test_api_change.py
|
||||||
|
+++ b/_test/test_api_change.py
|
||||||
|
@@ -9,7 +9,10 @@
|
||||||
|
import sys
|
||||||
|
import textwrap
|
||||||
|
import pytest
|
||||||
|
-from ruamel.std.pathlib import Path
|
||||||
|
+try:
|
||||||
|
+ from pathlib import Path
|
||||||
|
+except ImportError:
|
||||||
|
+ from pathlib2 import Path
|
||||||
|
|
||||||
|
|
||||||
|
class TestNewAPI:
|
||||||
|
diff --git a/_test/test_z_data.py b/_test/test_z_data.py
|
||||||
|
--- a/_test/test_z_data.py
|
||||||
|
+++ b/_test/test_z_data.py
|
||||||
|
@@ -6,7 +6,11 @@
|
||||||
|
import pytest # NOQA
|
||||||
|
import warnings # NOQA
|
||||||
|
|
||||||
|
-from ruamel.std.pathlib import Path
|
||||||
|
+try:
|
||||||
|
+ from pathlib import Path
|
||||||
|
+except ImportError:
|
||||||
|
+ from pathlib2 import Path
|
||||||
|
+
|
||||||
|
|
||||||
|
base_path = Path('data') # that is ruamel.yaml.data
|
||||||
|
PY2 = sys.version_info[0] == 2
|
||||||
|
|
@ -1,18 +1,18 @@
|
|||||||
--- ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/test_anchor.py.orig 2021-04-20 17:09:14.371877519 -0600
|
diff -u ruamel-yaml-ff02b83b8f91/_test/test_anchor.py.pytest27 ruamel-yaml-ff02b83b8f91/_test/test_anchor.py
|
||||||
+++ ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/test_anchor.py 2021-04-20 17:09:45.359070044 -0600
|
--- ruamel-yaml-ff02b83b8f91/_test/test_anchor.py.pytest27 2019-08-27 10:59:01.756747586 +0100
|
||||||
@@ -7,6 +7,7 @@ testing of anchors and the aliases refer
|
+++ ruamel-yaml-ff02b83b8f91/_test/test_anchor.py 2019-08-27 11:00:15.929713043 +0100
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
+from distutils.version import LooseVersion
|
+from distutils.version import LooseVersion
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
@@ -248,6 +249,7 @@ class TestAnchorsAliases:
|
@@ -248,6 +249,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
# this is an error in PyYAML
|
# this is an error in PyYAML
|
||||||
+ @pytest.mark.skipif(LooseVersion(pytest.__version__) < LooseVersion("2.8"), reason="Need pytest 2.7")
|
+ @pytest.mark.skipif(LooseVersion(pytest.__version__) < LooseVersion("2.8"), reason="Need pytest 2.7")
|
||||||
def test_reused_anchor(self):
|
def test_reused_anchor(self):
|
||||||
from ruamel.yaml.error import ReusedAnchorWarning
|
from ruamel.yaml.error import ReusedAnchorWarning
|
||||||
|
|
@ -1,37 +1,30 @@
|
|||||||
%global pypi_name ruamel.yaml
|
%global pypi_name ruamel.yaml
|
||||||
%global pname ruamel-yaml
|
%global pname ruamel-yaml
|
||||||
%global commit af9628b0d0479c35a60efc44b8d6dff9dc95aed2
|
%global commit 44504659794e
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: python-%{pname}
|
Name: python-%{pname}
|
||||||
Version: 0.15.100
|
Version: 0.16.6
|
||||||
Release: 1%{?dist}
|
Release: 7%{?dist}.1
|
||||||
Summary: YAML 1.2 loader/dumper package for Python
|
Summary: YAML 1.2 loader/dumper package for Python
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://sourceforge.net/projects/ruamel-yaml/
|
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
|
# Use bitbucket sources so we can run the tests
|
||||||
#Source0: https://bitbucket.org/ruamel/yaml/get/%{version}.tar.gz#/%{pname}-%{version}.tar.gz
|
Source0: https://bitbucket.org/ruamel/yaml/get/%{version}.tar.gz#/%{pname}-%{version}.tar.gz
|
||||||
# moved to sourceforge
|
|
||||||
Source0: https://sourceforge.net/code-snapshots/hg/r/ru/%{pname}/code/%{pname}-code-%{commit}.zip
|
|
||||||
Source1: bz-1951852-test.py
|
|
||||||
|
|
||||||
# Works with pytest 2.7
|
# Works with pytest 2.7
|
||||||
Patch0: python-ruamel-yaml-pytest27.patch
|
Patch0: python-ruamel-yaml-pytest27.patch
|
||||||
|
|
||||||
# Don't require ruamel.std.pathlib, but use stdlib's pathlib on py3, pathlib2 on py2
|
# Don't require ruamel.std.pathlib, but use stdlib's pathlib on py3, pathlib2 on py2
|
||||||
Patch1: python-ruamel-yaml-pathlib.patch
|
Patch1: python-ruamel-yaml-pathlib.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: libyaml-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
|
ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
|
||||||
It is a derivative of Kirill Simonov’s PyYAML 3.11
|
It is a derivative of Kirill Simonov’s PyYAML 3.11
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-%{pname}
|
%package -n python%{python3_pkgversion}-%{pname}
|
||||||
Summary: YAML 1.2 loader/dumper package for Python
|
Summary: YAML 1.2 loader/dumper package for Python
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
# For tests
|
# For tests
|
||||||
@ -42,6 +35,7 @@ BuildRequires: python%{python3_pkgversion}-typing
|
|||||||
%endif
|
%endif
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
||||||
|
|
||||||
|
Requires: python%{python3_pkgversion}-ruamel-yaml-clib
|
||||||
Requires: python%{python3_pkgversion}-setuptools
|
Requires: python%{python3_pkgversion}-setuptools
|
||||||
%if %{python3_pkgversion} == 34
|
%if %{python3_pkgversion} == 34
|
||||||
Requires: python%{python3_pkgversion}-typing
|
Requires: python%{python3_pkgversion}-typing
|
||||||
@ -52,7 +46,7 @@ ruamel.yaml is a YAML 1.2 loader/dumper package for Python.
|
|||||||
It is a derivative of Kirill Simonov’s PyYAML 3.11
|
It is a derivative of Kirill Simonov’s PyYAML 3.11
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pname}-code-%{commit} -p1
|
%autosetup -n %{pname}-%{commit} -p1
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -62,27 +56,59 @@ rm -rf %{pypi_name}.egg-info
|
|||||||
%{__python3} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT
|
%{__python3} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=$(echo build/lib.*%{python3_version}) py.test-%{python3_version} _test/test_*.py
|
PYTHONPATH=$(echo build/lib) py.test-%{python3_version} _test/test_*.py
|
||||||
PYTHONPATH=$(echo build/lib.*%{python3_version}) %{__python3} %{SOURCE1}
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{pname}
|
%files -n python%{python3_pkgversion}-%{pname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python3_sitearch}/ruamel
|
%{python3_sitelib}/ruamel
|
||||||
%{python3_sitearch}/_ruamel_yaml.cpython-*
|
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}-*.pth
|
||||||
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?-*.pth
|
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
||||||
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Apr 20 2021 Rich Megginson <rmeggins@redhat.com> - 0.15.100-1
|
* Thu Sep 30 2021 Akira TAGOH <tagoh@redhat.com> - 0.16.6-7.1
|
||||||
- Resolves: rhbz#1951852
|
- Add CI test.
|
||||||
error converting lists with embedded comments
|
Resolves: rhbz#2009152
|
||||||
|
|
||||||
* Mon Nov 23 2020 Pavel Cahyna <pcahyna@redhat.com> - 0.15.41-5
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.16.6-7
|
||||||
- Rebuild after adding to RHEL buildrood and configuring CI gating
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Wed Mar 06 2019 Lon Hohberger <lon@redhat.com> - 0.15.41-4
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.16.6-6
|
||||||
- Rebuild for new architectures
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.6-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.6-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.16.6-3
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.6-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 20 2020 Jason Montleon <jmontleo@redhat.com> - 0.16.6-1
|
||||||
|
- Update to 0.16.6
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.16.5-3
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Fri Aug 30 2019 Chandan Kumar <raukadah@gmail.com> - 0.16.5-2
|
||||||
|
- Added ruamel-yaml-clib as Requires
|
||||||
|
|
||||||
|
* Tue Aug 27 2019 Chedi Toueiti <chedi.toueiti@gmail.com> - 0.16.5-1
|
||||||
|
- Update to 0.16.5
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.41-6
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.41-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.41-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.41-3
|
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 0.15.41-3
|
||||||
- Subpackage python2-ruamel-yaml has been removed
|
- Subpackage python2-ruamel-yaml has been removed
|
@ -1,37 +0,0 @@
|
|||||||
import io
|
|
||||||
import sys
|
|
||||||
import ruamel.yaml
|
|
||||||
from ruamel.yaml import YAML
|
|
||||||
|
|
||||||
ruamel_yaml = YAML(typ="rt")
|
|
||||||
ruamel_yaml.default_flow_style = False
|
|
||||||
ruamel_yaml.preserve_quotes = True
|
|
||||||
ruamel_yaml.width = 1024
|
|
||||||
|
|
||||||
buf = """\
|
|
||||||
# top level
|
|
||||||
top:
|
|
||||||
# next level 1
|
|
||||||
- { here: 1, there: 2 }
|
|
||||||
# next level 2
|
|
||||||
- { there: 1, here: 2 }
|
|
||||||
top2:
|
|
||||||
# next level 1-2
|
|
||||||
- { here: 11, there: 22 }
|
|
||||||
# next level 2-2
|
|
||||||
- { there: 11, here: 22 }
|
|
||||||
"""
|
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
buf = open(sys.argv[1]).read()
|
|
||||||
ruamel_data = ruamel_yaml.load(buf)
|
|
||||||
ruamel_yaml.indent(mapping=2, sequence=4, offset=2)
|
|
||||||
outf = io.StringIO()
|
|
||||||
ruamel_yaml.dump(ruamel_data, outf)
|
|
||||||
buf = outf.getvalue()
|
|
||||||
print(buf)
|
|
||||||
ruamel_data = ruamel_yaml.load(buf)
|
|
||||||
outf = io.StringIO()
|
|
||||||
ruamel_yaml.dump(ruamel_data, outf)
|
|
||||||
buf = outf.getvalue()
|
|
||||||
print(buf)
|
|
@ -1,56 +0,0 @@
|
|||||||
--- ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_doc/conf.py.orig 2021-04-20 17:11:58.090894727 -0600
|
|
||||||
+++ ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_doc/conf.py 2021-04-20 17:13:38.946521358 -0600
|
|
||||||
@@ -75,7 +75,10 @@ class ryd2rst:
|
|
||||||
if False:
|
|
||||||
try:
|
|
||||||
from ryd.__main__ import RYDCmd
|
|
||||||
- from ruamel.std.pathlib import Path
|
|
||||||
+ try:
|
|
||||||
+ from pathlib import Path
|
|
||||||
+ except ImportError:
|
|
||||||
+ from pathlib2 import Path
|
|
||||||
|
|
||||||
oldargv = sys.argv
|
|
||||||
for fn in Path('.').glob('*.ryd'):
|
|
||||||
--- ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/test_api_change.py.orig 2021-04-20 17:12:13.434990060 -0600
|
|
||||||
+++ ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/test_api_change.py 2021-04-20 17:13:58.317641717 -0600
|
|
||||||
@@ -9,7 +9,10 @@ testing of anchors and the aliases refer
|
|
||||||
import sys
|
|
||||||
import textwrap
|
|
||||||
import pytest
|
|
||||||
-from ruamel.std.pathlib import Path
|
|
||||||
+try:
|
|
||||||
+ from pathlib import Path
|
|
||||||
+except ImportError:
|
|
||||||
+ from pathlib2 import Path
|
|
||||||
|
|
||||||
|
|
||||||
class TestNewAPI:
|
|
||||||
--- ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/roundtrip.py.orig 2021-04-20 17:25:36.621971457 -0600
|
|
||||||
+++ ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/roundtrip.py 2021-04-20 17:26:47.303408002 -0600
|
|
||||||
@@ -7,7 +7,10 @@ helper routines for testing round trip o
|
|
||||||
"""
|
|
||||||
import sys
|
|
||||||
import textwrap
|
|
||||||
-from ruamel.std.pathlib import Path
|
|
||||||
+try:
|
|
||||||
+ from pathlib import Path
|
|
||||||
+except ImportError:
|
|
||||||
+ from pathlib2 import Path
|
|
||||||
|
|
||||||
enforce = object()
|
|
||||||
|
|
||||||
--- ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/test_z_data.py.orig 2021-04-20 17:26:30.851306390 -0600
|
|
||||||
+++ ruamel-yaml-code-af9628b0d0479c35a60efc44b8d6dff9dc95aed2/_test/test_z_data.py 2021-04-20 17:26:40.850368147 -0600
|
|
||||||
@@ -6,7 +6,10 @@ import sys
|
|
||||||
import pytest # NOQA
|
|
||||||
import warnings # NOQA
|
|
||||||
|
|
||||||
-from ruamel.std.pathlib import Path
|
|
||||||
+try:
|
|
||||||
+ from pathlib import Path
|
|
||||||
+except ImportError:
|
|
||||||
+ from pathlib2 import Path
|
|
||||||
|
|
||||||
base_path = Path('data') # that is ruamel.yaml.data
|
|
||||||
PY2 = sys.version_info[0] == 2
|
|
Loading…
Reference in New Issue
Block a user