commit:     da0386a9938d27a1e5d87a13b0e617c494bca293
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 18:42:34 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Apr 23 18:42:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da0386a9

dev-util/cookiecutter: add 2.0.2

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-util/cookiecutter/Manifest                     |  1 +
 dev-util/cookiecutter/cookiecutter-2.0.2.ebuild    | 53 ++++++++++++++++++++++
 .../cookiecutter-2.0.2-fix-path-in-test.patch      | 13 ++++++
 3 files changed, 67 insertions(+)

diff --git a/dev-util/cookiecutter/Manifest b/dev-util/cookiecutter/Manifest
index f290b9281428..511c51671697 100644
--- a/dev-util/cookiecutter/Manifest
+++ b/dev-util/cookiecutter/Manifest
@@ -1,2 +1,3 @@
 DIST cookiecutter-1.7.2.tar.gz 253484 BLAKE2B 
de1c773cd5e53532edc7af7aaeac6061b1a5293330b8162da0f31895b0c3a58a4e0f36d66bee3da328a6b0a59fb5bd917a2f3f6fcf7772a4c63db5cd0030caae
 SHA512 
15cc145f143b4cac6e78b12e1c29e191d0c1c96b0187db05a4c8aac18310a5cb31d912073674ef4c01727c9b5a3b67f8c508842cb625db338b4034faa52a4a4c
 DIST cookiecutter-1.7.3.tar.gz 253444 BLAKE2B 
92ae74768c909ab8e2ae97ad87921ae0cbf24c417ab6985ac10eacd913981ee7756843e2588936174d3c04ecfa7a62077a6d4a323fdfa6d1872f3c84d943cbcb
 SHA512 
a7dd7993ba40a084a719d553afbb8035f26976f38a3e8ee373c8074db64eac6bd7b711eca8cedbfd1050fc057a0b45409af4d59ff3bde57b344317dbee56f10b
+DIST cookiecutter-2.0.2.tar.gz 260840 BLAKE2B 
008c4dceb1218ba7ead3846d24fc77253988a1fedfee929f30b4d2a63ee6ead9f2733e58e84f2d29840a5885b6655bb7d554664cec4175f49bd333b493c0f36d
 SHA512 
0bd490e3f7067fbe87aeff35255ccac0d05d723c6505345856284612752a65e4e35a8e5fb4410f900d42e3998e68d7aa8bec402686404336dedbc456fd4cda49

diff --git a/dev-util/cookiecutter/cookiecutter-2.0.2.ebuild 
b/dev-util/cookiecutter/cookiecutter-2.0.2.ebuild
new file mode 100644
index 000000000000..8b3f58232e8a
--- /dev/null
+++ b/dev-util/cookiecutter/cookiecutter-2.0.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1
+
+DESCRIPTION="Command-line utility to create projects from cookiecutters 
(project templates)"
+HOMEPAGE="https://github.com/cookiecutter/cookiecutter";
+SRC_URI="https://github.com/cookiecutter/cookiecutter/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+RDEPEND="
+       >=dev-python/binaryornot-0.4.4[${PYTHON_USEDEP}]
+       >=dev-python/click-7.0[${PYTHON_USEDEP}]
+       <dev-python/click-8.0.0[${PYTHON_USEDEP}]
+       >=dev-python/jinja-2.7[${PYTHON_USEDEP}]
+       <dev-python/jinja-4.0.0[${PYTHON_USEDEP}]
+       >=dev-python/jinja2-time-0.2.0[${PYTHON_USEDEP}]
+       >=dev-python/python-slugify-4.0.0[${PYTHON_USEDEP}]
+       >=dev-python/requests-2.23.0[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+       test? (
+               dev-python/pytest-mock[${PYTHON_USEDEP}]
+               dev-python/freezegun[${PYTHON_USEDEP}]
+               dev-vcs/git
+       )
+"
+
+DOCS=( README.md HISTORY.md CONTRIBUTING.md )
+
+PATCHES=(
+       "${FILESDIR}/test_cli-1.7.2.patch"
+       # https://github.com/cookiecutter/cookiecutter/issues/1655
+       "${FILESDIR}/${P}-fix-path-in-test.patch"
+)
+
+distutils_enable_tests pytest
+# TODO: Package sphinx-click
+# distutils_enable_sphinx docs \
+#      dev-python/sphinx_rtd_theme \
+#      dev-python/recommonmark
+
+python_test() {
+       epytest -o addopts=
+}

diff --git 
a/dev-util/cookiecutter/files/cookiecutter-2.0.2-fix-path-in-test.patch 
b/dev-util/cookiecutter/files/cookiecutter-2.0.2-fix-path-in-test.patch
new file mode 100644
index 000000000000..569ca97e5e42
--- /dev/null
+++ b/dev-util/cookiecutter/files/cookiecutter-2.0.2-fix-path-in-test.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/test_generate_file.py b/tests/test_generate_file.py
+index 2ca30df..47e14ec 100644
+--- a/tests/test_generate_file.py
++++ b/tests/test_generate_file.py
+@@ -118,7 +118,7 @@ def expected_msg():
+     """Fixture. Used to ensure that exception generated text contain full 
data."""
+     msg = (
+         'Missing end of comment tag\n'
+-        '  File "./tests/files/syntax_error.txt", line 1\n'
++        '  File "tests/files/syntax_error.txt", line 1\n'
+         '    I eat {{ syntax_error }} {# this comment is not closed}'
+     )
+     return msg.replace("/", os.sep)

Reply via email to