- Add patch to build with new click cookiecutter-click7.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/cookiecutter?expand=0&rev=5
This commit is contained in:
parent
81c5a12c92
commit
7b9188ec52
41
cookiecutter-click7.patch
Normal file
41
cookiecutter-click7.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 877f4f1da68aa292ec44acab0ec4d76359a1f375 Mon Sep 17 00:00:00 2001
|
||||
From: Jai Ram Rideout <jai.rideout@gmail.com>
|
||||
Date: Fri, 28 Sep 2018 12:51:53 -0700
|
||||
Subject: [PATCH] Update unit tests for Click 7.0
|
||||
|
||||
Fixed two unit tests that fail with Click 7.0 (see #1109 for details).
|
||||
|
||||
Fixes #1109.
|
||||
|
||||
The tests now pass with Click 7.0, but will fail with older versions of Click due to small differences in usage error messages. Do the tests need to pass with all supported versions of Click (>=5.0) or is it sufficient to have them pass with the latest supported version of Click?
|
||||
---
|
||||
tests/test_cli.py | 2 +-
|
||||
tests/test_cookiecutter_invocation.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: cookiecutter-1.6.0/tests/test_cli.py
|
||||
===================================================================
|
||||
--- cookiecutter-1.6.0.orig/tests/test_cli.py
|
||||
+++ cookiecutter-1.6.0/tests/test_cli.py
|
||||
@@ -387,7 +387,7 @@ def test_cli_extra_context_invalid_forma
|
||||
'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
|
||||
|
||||
|
||||
Index: cookiecutter-1.6.0/tests/test_cookiecutter_invocation.py
|
||||
===================================================================
|
||||
--- cookiecutter-1.6.0.orig/tests/test_cookiecutter_invocation.py
|
||||
+++ cookiecutter-1.6.0/tests/test_cookiecutter_invocation.py
|
||||
@@ -21,7 +21,7 @@ def test_should_raise_error_without_temp
|
||||
subprocess.check_call(['python3', '-m', 'cookiecutter.cli'])
|
||||
|
||||
_, err = capfd.readouterr()
|
||||
- exp_message = 'Error: Missing argument "template".'
|
||||
+ exp_message = 'Error: Missing argument "TEMPLATE".'
|
||||
assert exp_message in err
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 2 09:55:21 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add patch to build with new click cookiecutter-click7.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 21 10:37:20 UTC 2018 - sebix+novell.com@sebix.at
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package cookiecutter
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 LISA GmbH, Bingen, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -13,7 +13,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
@ -28,11 +28,12 @@ Source: https://files.pythonhosted.org/packages/source/c/cookiecutter/co
|
||||
Source1: ccext.py
|
||||
# PATCH-FIX-OPENSUSE fix-python-invocation-tests.diff hpj@urpla.net
|
||||
Patch0: fix-python-invocation-tests.diff
|
||||
Patch1: cookiecutter-click7.patch
|
||||
BuildRequires: git
|
||||
BuildRequires: python3-Jinja2 >= 2.7
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-binaryornot >= 0.2.0
|
||||
BuildRequires: python3-click >= 5.0
|
||||
BuildRequires: python3-click >= 7.0
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-future >= 0.15.2
|
||||
BuildRequires: python3-jinja2-time >= 0.1.0
|
||||
@ -42,7 +43,7 @@ BuildRequires: python3-whichcraft >= 0.4.0
|
||||
Requires: git
|
||||
Requires: python3-Jinja2 >= 2.7
|
||||
Requires: python3-binaryornot >= 0.2.0
|
||||
Requires: python3-click >= 5.0
|
||||
Requires: python3-click >= 7.0
|
||||
Requires: python3-future >= 0.15.2
|
||||
Requires: python3-jinja2-time >= 0.1.0
|
||||
Requires: python3-poyo >= 0.1.0
|
||||
@ -81,6 +82,7 @@ This package contains the documentation for cookiecutter.
|
||||
%prep
|
||||
%setup -q -n cookiecutter-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
sed -i "s/cookiecutter =/cookiecutter-%{py3_ver} =/" setup.py
|
||||
cp %{SOURCE1} docs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user