Accepting request 761131 from devel:languages:python

- remove obsolete patch fix-python-invocation-tests.diff
- remove obsolete patch cookiecutter-click7.patch
- update to version 1.7.0:
 * Important Changes:
  * Drop support for EOL Python 3.4, thanks to [@jamescurtin](https://github.com/jamescurtin) and [@insspb](https://github.com/insspb) (#1024)
  * Drop support for EOL Python 3.3, thanks to [@hugovk](https://github.com/hugovk) (#1024)
  * Increase the minimum click version to 7.0, thanks to [@rly](https://github.com/rly) and [@luzfcb](https://github.com/luzfcb) (#1168)
 * Other Changes:
  * PEP257 fixing docstrings in exceptions.py. Thanks to [@MinchinWeb](https://github.com/MinchinWeb) (#1237)
  * PEP257 fixing docstrings in replay.py. Thanks to [@kishan](https://github.com/kishan3) (#1234)
  * PEP257 fixing docstrings in test_unzip.py. Thanks to [@tonytheleg](https://github.com/tonytheleg) and [@insspb](https://github.com/insspb) (#1236, #1262)
  * Fixed tests sequence for appveyor, to exclude file not found bug. Thanks to [@insspb](https://github.com/insspb) (#1257)
  * Updates REAMDE.md with svg badge for appveyor. Thanks to [@sobolevn](https://github.com/sobolevn) (#1254)
  * Add missing {% endif %} to Choice Variables example. Thanks to [@mattstibbs](https://github.com/mattstibbs) (#1249)
  * Core documentation converted to Markdown format thanks to [@wagnernegrao](https://github.com/wagnernegrao), [@insspb](https://github.com/insspb) (#1216)
  * Tests update: use sys.executable when invoking python in python 3 only environment thanks to [@vincentbernat](https://github.com/vincentbernat) (#1221)
  * Prevent `click` API v7.0 from showing choices when already shown, thanks to [@rly](https://github.com/rly) and [@luzfcb](https://github.com/luzfcb) (#1168)
  * Test the codebase with python3.8 beta on tox and travis-ci (#1206), thanks to [@mihrab34](https://github.com/mihrab34)
  * Add a [CODE\_OF\_CONDUCT.md](https://github.com/audreyr/cookiecutter/blob/master/CODE_OF_CONDUCT.md) file to the project, thanks to [@andreagrandi](https://github.com/andreagrandi) (#1009)
  * Update docstrings in `cookiecutter/main.py`, `cookiecutter/__init__.py`, and `cookiecutter/log.py` to follow the PEP 257 style guide, thanks to [@meahow](https://github.com/meahow) (#998, #999, #1000)
  * Update docstrings in `cookiecutter/utils.py` to follow the PEP 257 style guide, thanks to [@dornheimer](https://github.com/dornheimer)(#1026)
  * Fix grammar in *Choice Variables* documentation, thanks to [@jubrilissa](https://github.com/jubrilissa) (#1011)
  * Update installation docs with links to the Windows Subsystem and GNU utilities, thanks to [@Nythiennzo](https://github.com/Nythiennzo) for the PR and [@BruceEckel](https://github.com/BruceEckel) for the review (#1016)
  * Upgrade flake8 to version 3.5.0, thanks to [@cclauss](https://github.com/cclauss) (#1038)
  * Update tutorial with explanation for how cookiecutter finds the template file, thanks to [@accraze](https://github.com/accraze)(#1025)
  * Update CI config files to use `TOXENV` environment variable, thanks to [@asottile](https://github.com/asottile) (#1019)
  * Improve user documentation for writing hooks, thanks to [@jonathansick](https://github.com/jonathansick) (#1057)
  * Make sure to preserve the order of items in the generated cookiecutter context, thanks to [@hackebrot](https://github.com/hackebrot) (#1074)
  * Fixed DeprecationWarning for a regular expression on python 3.6, thanks to [@reinout](https://github.com/reinout) (#1124)
  * Document use of cookiecutter-template topic on GitHub, thanks to [@ssbarnea](https://github.com/ssbarnea) (#1189)

OBS-URL: https://build.opensuse.org/request/show/761131
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cookiecutter?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2020-01-06 14:24:34 +00:00 committed by Git OBS Bridge
commit 0171317e4c
6 changed files with 57 additions and 71 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1316a52e1c1f08db0c9efbf7d876dbc01463a74b155a0d83e722be88beda9a3e
size 181753

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:479997e1c26c51bbbaf04097ef7d82b1d91cfb03f570cb5fb5ca265c88db04ae
size 148363

View File

@ -1,41 +0,0 @@
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

View File

@ -1,4 +1,51 @@
-------------------------------------------------------------------
Wed Jan 1 10:54:34 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
- remove obsolete patch fix-python-invocation-tests.diff
- remove obsolete patch cookiecutter-click7.patch
- update to version 1.7.0:
* Important Changes:
* Drop support for EOL Python 3.4, thanks to [@jamescurtin](https://github.com/jamescurtin) and [@insspb](https://github.com/insspb) (#1024)
* Drop support for EOL Python 3.3, thanks to [@hugovk](https://github.com/hugovk) (#1024)
* Increase the minimum click version to 7.0, thanks to [@rly](https://github.com/rly) and [@luzfcb](https://github.com/luzfcb) (#1168)
* Other Changes:
* PEP257 fixing docstrings in exceptions.py. Thanks to [@MinchinWeb](https://github.com/MinchinWeb) (#1237)
* PEP257 fixing docstrings in replay.py. Thanks to [@kishan](https://github.com/kishan3) (#1234)
* PEP257 fixing docstrings in test_unzip.py. Thanks to [@tonytheleg](https://github.com/tonytheleg) and [@insspb](https://github.com/insspb) (#1236, #1262)
* Fixed tests sequence for appveyor, to exclude file not found bug. Thanks to [@insspb](https://github.com/insspb) (#1257)
* Updates REAMDE.md with svg badge for appveyor. Thanks to [@sobolevn](https://github.com/sobolevn) (#1254)
* Add missing {% endif %} to Choice Variables example. Thanks to [@mattstibbs](https://github.com/mattstibbs) (#1249)
* Core documentation converted to Markdown format thanks to [@wagnernegrao](https://github.com/wagnernegrao), [@insspb](https://github.com/insspb) (#1216)
* Tests update: use sys.executable when invoking python in python 3 only environment thanks to [@vincentbernat](https://github.com/vincentbernat) (#1221)
* Prevent `click` API v7.0 from showing choices when already shown, thanks to [@rly](https://github.com/rly) and [@luzfcb](https://github.com/luzfcb) (#1168)
* Test the codebase with python3.8 beta on tox and travis-ci (#1206), thanks to [@mihrab34](https://github.com/mihrab34)
* Add a [CODE\_OF\_CONDUCT.md](https://github.com/audreyr/cookiecutter/blob/master/CODE_OF_CONDUCT.md) file to the project, thanks to [@andreagrandi](https://github.com/andreagrandi) (#1009)
* Update docstrings in `cookiecutter/main.py`, `cookiecutter/__init__.py`, and `cookiecutter/log.py` to follow the PEP 257 style guide, thanks to [@meahow](https://github.com/meahow) (#998, #999, #1000)
* Update docstrings in `cookiecutter/utils.py` to follow the PEP 257 style guide, thanks to [@dornheimer](https://github.com/dornheimer)(#1026)
* Fix grammar in *Choice Variables* documentation, thanks to [@jubrilissa](https://github.com/jubrilissa) (#1011)
* Update installation docs with links to the Windows Subsystem and GNU utilities, thanks to [@Nythiennzo](https://github.com/Nythiennzo) for the PR and [@BruceEckel](https://github.com/BruceEckel) for the review (#1016)
* Upgrade flake8 to version 3.5.0, thanks to [@cclauss](https://github.com/cclauss) (#1038)
* Update tutorial with explanation for how cookiecutter finds the template file, thanks to [@accraze](https://github.com/accraze)(#1025)
* Update CI config files to use `TOXENV` environment variable, thanks to [@asottile](https://github.com/asottile) (#1019)
* Improve user documentation for writing hooks, thanks to [@jonathansick](https://github.com/jonathansick) (#1057)
* Make sure to preserve the order of items in the generated cookiecutter context, thanks to [@hackebrot](https://github.com/hackebrot) (#1074)
* Fixed DeprecationWarning for a regular expression on python 3.6, thanks to [@reinout](https://github.com/reinout) (#1124)
* Document use of cookiecutter-template topic on GitHub, thanks to [@ssbarnea](https://github.com/ssbarnea) (#1189)
* Update README badge links, thanks to [@luzfcb](https://github.com/luzfcb) (#1207)
* Update prompt.py to match pep257 guidelines, thanks to [@jairideout](https://github.com/jairideout) (#1105)
* Update link to Jinja2 extensions documentation, thanks to [@dacog](https://github.com/dacog) (#1193)
* Require pip 9.0.0 or newer for tox environments, thanks to [@hackebrot](https://github.com/hackebrot) (#1215)
* Use io.open contextmanager when reading hook files, thanks to [@jcb91](https://github.com/jcb91) (#1147)
* Add more cookiecutter templates to the mix:
* [cookiecutter-python-cli](https://github.com/xuanluong/cookiecutter-python-cli) by [@xuanluong](https://github.com/xuanluong) (#1003)
* [cookiecutter-docker-science](https://github.com/docker-science/cookiecutter-docker-science) by [@takahi-i](https://github.com/takahi-i) (#1040)
* [cookiecutter-flask-skeleton](https://github.com/realpython/cookiecutter-flask-skeleton) by [@mjhea0](https://github.com/mjhea0) (#1052)
* [cookiecutter-awesome](https://github.com/Pawamoy/cookiecutter-awesome) by [@Pawamoy](https://github.com/Pawamoy) (#1051)
* [cookiecutter-flask-ask](https://github.com/chrisvoncsefalvay/cookiecutter-flask-ask) by [@machinekoder](https://github.com/machinekoder) (#1056)
* [cookiecutter-data-driven-journalism](https://github.com/jastark/cookiecutter-data-driven-journalism) by [@JAStark](https://github.com/JAStark) (#1020)
* [cookiecutter-tox-plugin](https://github.com/tox-dev/cookiecutter-tox-plugin) by [@obestwalter](https://github.com/obestwalter) (#1103)
* [cookiecutter-django-dokku](https://github.com/mashrikt/cookiecutter-django-dokku) by [@mashrikt](https://github.com/mashrikt) (#1093)
-------------------------------------------------------------------
Wed Jan 2 09:55:21 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to build with new click cookiecutter-click7.patch

View File

@ -1,7 +1,7 @@
#
# spec file for package cookiecutter
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2017 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@ -18,20 +18,16 @@
Name: cookiecutter
Version: 1.6.0
Version: 1.7.0
Release: 0
Summary: A command-line utility that creates projects from project templates
License: BSD-3-Clause
Group: Development/Languages/Python
Url: https://github.com/audreyr/cookiecutter
URL: https://github.com/audreyr/cookiecutter
Source: https://files.pythonhosted.org/packages/source/c/cookiecutter/cookiecutter-%{version}.tar.gz
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 >= 7.0
BuildRequires: python3-devel
@ -60,6 +56,10 @@ BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-mock
BuildRequires: python3-requests >= 2.18.0
# /SECTION
# SECTION Documentation requirements
BuildRequires: python3-Sphinx
BuildRequires: python3-recommonmark
# /SECTION
%package doc
Summary: Documentation files for %{name}
@ -81,8 +81,6 @@ 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
@ -116,7 +114,6 @@ if [ $1 -eq 0 ] ; then
fi
%files
%doc AUTHORS.rst README.rst
%license LICENSE
%ghost %{_sysconfdir}/alternatives/cookiecutter
%{_bindir}/cookiecutter

View File

@ -1,17 +0,0 @@
From: Hans-Peter Jansen <hpj@urpla.net>
Date: 2017-02-14 23:45:55+0100
Subject: when build for python3, call python3
Index: b/tests/test_cookiecutter_invocation.py
===================================================================
--- a/tests/test_cookiecutter_invocation.py
+++ b/tests/test_cookiecutter_invocation.py
@@ -18,7 +18,7 @@ from cookiecutter import utils
def test_should_raise_error_without_template_arg(capfd):
with pytest.raises(subprocess.CalledProcessError):
- subprocess.check_call(['python', '-m', 'cookiecutter.cli'])
+ subprocess.check_call(['python3', '-m', 'cookiecutter.cli'])
_, err = capfd.readouterr()
exp_message = 'Error: Missing argument "template".'