Date: Saturday, March 14, 2020 @ 11:19:21 Author: dvzrv Revision: 596628
Adding python-cookiecutter as depends for molecule. Added: python-cookiecutter/ python-cookiecutter/repos/ python-cookiecutter/trunk/ python-cookiecutter/trunk/PKGBUILD python-cookiecutter/trunk/python-cookiecutter-1.7.0-cli_tests.patch -------------------------------------------+ PKGBUILD | 48 ++++++++++++++++++++++++++++ python-cookiecutter-1.7.0-cli_tests.patch | 24 ++++++++++++++ 2 files changed, 72 insertions(+) Added: python-cookiecutter/trunk/PKGBUILD =================================================================== --- python-cookiecutter/trunk/PKGBUILD (rev 0) +++ python-cookiecutter/trunk/PKGBUILD 2020-03-14 11:19:21 UTC (rev 596628) @@ -0,0 +1,48 @@ +# Maintainer: David Runge <dv...@archlinux.org> + +_name=cookiecutter +pkgname=python-cookiecutter +pkgver=1.7.0 +pkgrel=2 +pkgdesc="A command-line utility that creates projects from project templates" +arch=('any') +url="https://github.com/cookiecutter/cookiecutter" +license=('BSD') +depends=('python-binaryornot' 'python-click' 'python-future' 'python-jinja' +'python-jinja-time' 'python-poyo' 'python-requests' 'python-whichcraft') +makedepends=('python-setuptools') +checkdepends=('git' 'python-freezegun' 'python-pytest' 'python-pytest-cov' +'python-pytest-mock') +source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz" + "${pkgname}-1.7.0-cli_tests.patch") +sha512sums=('c57315251085ed55494d09564a43dd6348971f8b78e5755642cd64473a73b03c00a7c513f5dd05d098db9fd7a74aef90f115975386084f3df8abc08fd318922c' + '6bac3de41862373593345f7f9face57385473784f6fff367585314bade2262c0b55564f817092f32f38b0b166a5fc2f65cfcbcca4a431719858e8e7b59637df2') + +prepare() { + mv -v "${_name}-${pkgver}" "$pkgname-$pkgver" + cd "$pkgname-$pkgver" + # fixing issues with click output: + # https://github.com/cookiecutter/cookiecutter/issues/1327 + patch -Np1 -i "../${pkgname}-1.7.0-cli_tests.patch" +} + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} + +check() { + cd "$pkgname-$pkgver" + export PYTHONPATH="build:${PYTHONPATH}" + pytest -v +} + +package() { + cd "$pkgname-$pkgver" + python setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" +} Added: python-cookiecutter/trunk/python-cookiecutter-1.7.0-cli_tests.patch =================================================================== --- python-cookiecutter/trunk/python-cookiecutter-1.7.0-cli_tests.patch (rev 0) +++ python-cookiecutter/trunk/python-cookiecutter-1.7.0-cli_tests.patch 2020-03-14 11:19:21 UTC (rev 596628) @@ -0,0 +1,24 @@ +diff -ruN a/tests/test_cli.py b/tests/test_cli.py +--- 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 + +