From 80286a62392fe80b0d453243af14260b379d557c Mon Sep 17 00:00:00 2001 From: chedi toueiti Date: Wed, 28 Aug 2019 14:34:00 +0000 Subject: [PATCH] update to 0.16.5 --- python-ruamel-yaml-pathlib.patch | 77 ++++++++++++++++++++++--------- python-ruamel-yaml-pytest27.patch | 21 ++++----- python-ruamel-yaml.spec | 15 +++--- sources | 2 +- 4 files changed, 74 insertions(+), 41 deletions(-) diff --git a/python-ruamel-yaml-pathlib.patch b/python-ruamel-yaml-pathlib.patch index 6cf8156..fccb550 100644 --- a/python-ruamel-yaml-pathlib.patch +++ b/python-ruamel-yaml-pathlib.patch @@ -1,32 +1,63 @@ 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 +@@ -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 + \ No newline at end of file diff --git a/python-ruamel-yaml-pytest27.patch b/python-ruamel-yaml-pytest27.patch index 816ccb7..9ef3da0 100644 --- a/python-ruamel-yaml-pytest27.patch +++ b/python-ruamel-yaml-pytest27.patch @@ -1,19 +1,18 @@ -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 +diff -u ruamel-yaml-ff02b83b8f91/_test/test_anchor.py.pytest27 ruamel-yaml-ff02b83b8f91/_test/test_anchor.py +--- ruamel-yaml-ff02b83b8f91/_test/test_anchor.py.pytest27 2019-08-27 10:59:01.756747586 +0100 ++++ ruamel-yaml-ff02b83b8f91/_test/test_anchor.py 2019-08-27 11:00:15.929713043 +0100 +@@ -7,6 +7,7 @@ """ - + import pytest +from distutils.version import LooseVersion from textwrap import dedent import platform - -@@ -231,6 +232,7 @@ class TestAnchorsAliases: - """) - + +@@ -248,6 +249,7 @@ + ) + # 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 + from ruamel.yaml.error import ReusedAnchorWarning diff --git a/python-ruamel-yaml.spec b/python-ruamel-yaml.spec index 011c3bf..5393e4d 100644 --- a/python-ruamel-yaml.spec +++ b/python-ruamel-yaml.spec @@ -1,12 +1,12 @@ %global pypi_name ruamel.yaml %global pname ruamel-yaml -%global commit 75b1b39341d9 +%global commit ff02b83b8f91 Name: python-%{pname} -Version: 0.15.41 -Release: 6%{?dist} -Summary: YAML 1.2 loader/dumper package for Python +Version: 0.16.5 +Release: 1%{?dist} +Summary: YAML 1.2 loader/dumper package for Python License: MIT URL: https://bitbucket.org/ruamel/yaml @@ -18,7 +18,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 @@ -27,7 +27,7 @@ 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 +Summary: YAML 1.2 loader/dumper package for Python BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools # For tests @@ -69,6 +69,9 @@ PYTHONPATH=$(echo build/lib.*%{python3_version}) py.test-%{python3_version} _tes %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* 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 diff --git a/sources b/sources index 264cecd..b78cee8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruamel-yaml-0.15.41.tar.gz) = 5dcc6430a6e13a419132b9dd54bc27dedeb8037d079717817a23bde5700469fa58f634eecc6f9ca6ce67c0146ec42df0a8f9f41eca0b1e35bf6dcce1a13860d6 +SHA512 (ruamel-yaml-0.16.5.tar.gz) = ce08ae50b9084d56c8e0f5a546cb3a23d4cdad643836aa60a44a995459d3d90057d14fa79493c36f415d7bc22936806d0b4f9b34f93192ac536526a314024c45 \ No newline at end of file