From 3991d63c65ece52a3e59c5e730b2256af1951f96 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 2 Mar 2021 04:19:02 +0000 Subject: [PATCH] import python-ruamel-yaml-0.15.41-5.el8 --- .gitignore | 1 + .python-ruamel-yaml.metadata | 1 + SOURCES/python-ruamel-yaml-pathlib.patch | 32 +++++ SOURCES/python-ruamel-yaml-pytest27.patch | 19 +++ SPECS/python-ruamel-yaml.spec | 139 ++++++++++++++++++++++ 5 files changed, 192 insertions(+) create mode 100644 .gitignore create mode 100644 .python-ruamel-yaml.metadata create mode 100644 SOURCES/python-ruamel-yaml-pathlib.patch create mode 100644 SOURCES/python-ruamel-yaml-pytest27.patch create mode 100644 SPECS/python-ruamel-yaml.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ac8e48 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ruamel-yaml-0.15.41.tar.gz diff --git a/.python-ruamel-yaml.metadata b/.python-ruamel-yaml.metadata new file mode 100644 index 0000000..b6aad49 --- /dev/null +++ b/.python-ruamel-yaml.metadata @@ -0,0 +1 @@ +d463529d6ebf589603129637c0dc5f01b4767aac SOURCES/ruamel-yaml-0.15.41.tar.gz diff --git a/SOURCES/python-ruamel-yaml-pathlib.patch b/SOURCES/python-ruamel-yaml-pathlib.patch new file mode 100644 index 0000000..6cf8156 --- /dev/null +++ b/SOURCES/python-ruamel-yaml-pathlib.patch @@ -0,0 +1,32 @@ +diff --git a/_doc/conf.py b/_doc/conf.py +index 19a19a3..a2b852d 100644 +--- a/_doc/conf.py ++++ b/_doc/conf.py +@@ -68,7 +68,10 @@ print('ruamel.yaml version', version) + + 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'): + sys.argv = ['ryd', 'convert', '--no-pdf', str(fn)] +diff --git a/_test/test_api_change.py b/_test/test_api_change.py +index c0f492c..0b3f2d7 100644 +--- a/_test/test_api_change.py ++++ b/_test/test_api_change.py +@@ -11,7 +11,10 @@ import textwrap + import pytest + from ruamel.yaml import YAML + from ruamel.yaml.constructor import DuplicateKeyError +-from ruamel.std.pathlib import Path ++try: ++ from pathlib import Path ++except ImportError: ++ from pathlib2 import Path + + + class TestNewAPI: diff --git a/SOURCES/python-ruamel-yaml-pytest27.patch b/SOURCES/python-ruamel-yaml-pytest27.patch new file mode 100644 index 0000000..816ccb7 --- /dev/null +++ b/SOURCES/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/SPECS/python-ruamel-yaml.spec b/SPECS/python-ruamel-yaml.spec new file mode 100644 index 0000000..78af3e1 --- /dev/null +++ b/SPECS/python-ruamel-yaml.spec @@ -0,0 +1,139 @@ +%global pypi_name ruamel.yaml +%global pname ruamel-yaml +%global commit 75b1b39341d9 + + +Name: python-%{pname} +Version: 0.15.41 +Release: 5%{?dist} +Summary: YAML 1.2 loader/dumper package for Python + +License: MIT +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 + +# Don't require ruamel.std.pathlib, but use stdlib's pathlib on py3, pathlib2 on py2 +Patch1: python-ruamel-yaml-pathlib.patch + +BuildRequires: gcc +BuildRequires: libyaml-devel + +%description +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 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}} + +Requires: python%{python3_pkgversion}-setuptools +%if %{python3_pkgversion} == 34 +Requires: python%{python3_pkgversion}-typing +%endif + +%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 + +%prep +%autosetup -n %{pname}-%{commit} -p1 +rm -rf %{pypi_name}.egg-info + +%build +%py3_build + +%install +%{__python3} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT + +%check +PYTHONPATH=$(echo build/lib.*%{python3_version}) py.test-%{python3_version} _test/test_*.py + +%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 + +%changelog +* Mon Nov 23 2020 Pavel Cahyna - 0.15.41-5 +- Rebuild after adding to RHEL buildrood and configuring CI gating + +* Wed Mar 06 2019 Lon Hohberger - 0.15.41-4 +- Rebuild for new architectures + +* 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.