diff --git a/cookiecutter.changes b/cookiecutter.changes index e94b3dd..ae5b5a3 100644 --- a/cookiecutter.changes +++ b/cookiecutter.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 3 19:47:20 UTC 2020 - Sebastian Wagner + +- 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 diff --git a/cookiecutter.spec b/cookiecutter.spec index 6709d24..f26a12d 100644 --- a/cookiecutter.spec +++ b/cookiecutter.spec @@ -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 diff --git a/fix-click-711.patch b/fix-click-711.patch new file mode 100644 index 0000000..b3348b0 --- /dev/null +++ b/fix-click-711.patch @@ -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