- add fix-click-711.patch to fix compatibility with click 7.1.1 which fixes the tests which fixes the build.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/cookiecutter?expand=0&rev=9
This commit is contained in:
Sebastian Wagner 2020-04-03 20:05:20 +00:00 committed by Git OBS Bridge
parent 1faec0e600
commit 1193d654d8
3 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Apr 3 19:47:20 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
- add fix-click-711.patch to fix compatibility with click 7.1.1 which fixes the tests which fixes the build.
-------------------------------------------------------------------
Wed Jan 1 10:54:34 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@ -26,6 +26,8 @@ Group: Development/Languages/Python
URL: https://github.com/audreyr/cookiecutter
Source: https://files.pythonhosted.org/packages/source/c/cookiecutter/cookiecutter-%{version}.tar.gz
Source1: ccext.py
# PATCH-FIX-UPSTEAM fix-click-711.patch -- compatibility with click 7.1.1
Patch0: fix-click-711.patch
BuildRequires: git
BuildRequires: python3-Jinja2 >= 2.7
BuildRequires: python3-binaryornot >= 0.2.0
@ -83,6 +85,7 @@ This package contains the documentation for cookiecutter.
%setup -q -n cookiecutter-%{version}
sed -i "s/cookiecutter =/cookiecutter-%{py3_ver} =/" setup.py
cp %{SOURCE1} docs
%patch0 -p1
%build
python3 setup.py build

23
fix-click-711.patch Normal file
View File

@ -0,0 +1,23 @@
diff -ruN a/tests/test_cli.py b/tests/test_cli.py
https://github.com/cookiecutter/cookiecutter/issues/1327
--- a/tests/test_cli.py 2019-12-21 19:29:52.000000000 +0100
+++ b/tests/test_cli.py 2020-03-14 11:53:20.505357215 +0100
@@ -390,7 +390,7 @@
'ExtraContextWithNoEqualsSoInvalid',
)
assert result.exit_code == 2
- assert 'Error: Invalid value for "[EXTRA_CONTEXT]..."' in result.output
+ assert "Error: Invalid value for '[EXTRA_CONTEXT]...'" in result.output
assert 'should contain items of the form key=value' in result.output
diff -ruN a/tests/test_cookiecutter_invocation.py b/tests/test_cookiecutter_invocation.py
--- a/tests/test_cookiecutter_invocation.py 2019-12-21 19:29:52.000000000 +0100
+++ b/tests/test_cookiecutter_invocation.py 2020-03-14 11:52:17.332550458 +0100
@@ -23,7 +23,7 @@
subprocess.check_call([sys.executable, '-m', 'cookiecutter.cli'])
_, err = capfd.readouterr()
- exp_message = 'Error: Missing argument "TEMPLATE".'
+ exp_message = "Error: Missing argument 'TEMPLATE'."
assert exp_message in err