From e2ef7c72c2725cd65915e0fe9d29ee9e25ecf417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Wed, 15 Jul 2020 11:35:59 +0200 Subject: [PATCH] Add patch because of old failing PyYAML --- ...ted_strings-failing-if-PyYAML-is-too.patch | 25 +++++++++++++++++++ yamllint.spec | 8 ++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 0001-Skip-test-on-quoted_strings-failing-if-PyYAML-is-too.patch diff --git a/0001-Skip-test-on-quoted_strings-failing-if-PyYAML-is-too.patch b/0001-Skip-test-on-quoted_strings-failing-if-PyYAML-is-too.patch new file mode 100644 index 0000000..1702677 --- /dev/null +++ b/0001-Skip-test-on-quoted_strings-failing-if-PyYAML-is-too.patch @@ -0,0 +1,25 @@ +From 1c85f6c244e5b71f625486cf6a0cb84402cc12f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Adrien=20Verg=C3=A9?= +Date: Wed, 15 Jul 2020 11:21:02 +0200 +Subject: [PATCH] Skip test on quoted_strings failing if PyYAML is too old + +--- + tests/rules/test_quoted_strings.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/rules/test_quoted_strings.py b/tests/rules/test_quoted_strings.py +index d66cb0b..7c01441 100644 +--- a/tests/rules/test_quoted_strings.py ++++ b/tests/rules/test_quoted_strings.py +@@ -360,7 +360,7 @@ class QuotedTestCase(RuleTestCase): + 'k6: ":wq"\n', # fails + conf, problem1=(3, 5), problem2=(5, 5), problem3=(7, 5)) + +- def test_only_when_needed_extras(self): ++ def skip_test_only_when_needed_extras(self): + conf = ('quoted-strings:\n' + ' required: true\n' + ' extra-allowed: [^http://]\n') +-- +2.26.2 + diff --git a/yamllint.spec b/yamllint.spec index f8f9192..82af1de 100644 --- a/yamllint.spec +++ b/yamllint.spec @@ -3,12 +3,13 @@ Name: %{pypi_name} Version: 1.23.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A linter for YAML files License: GPLv3+ URL: https://github.com/adrienverge/yamllint Source0: https://pypi.python.org/packages/source/y/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Patch0: 0001-Skip-test-on-quoted_strings-failing-if-PyYAML-is-too.patch BuildArch: noarch Requires: python%{python3_pkgversion}-pathspec @@ -29,7 +30,7 @@ repetition and cosmetic problems such as lines length, trailing spaces, indentation, etc. %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info @@ -53,6 +54,9 @@ rm -rf %{pypi_name}.egg-info %exclude %{python3_sitelib}/tests %changelog +* Wed Jul 15 2020 Adrien Vergé - 1.23.0-2 +- Add patch because of old failing PyYAML + * Fri Apr 17 2020 Adrien Vergé - 1.23.0-1 - Update to latest upstream version