diff --git a/0001-Fix-broken-test-1335.patch b/0001-Fix-broken-test-1335.patch new file mode 100644 index 0000000..9877dde --- /dev/null +++ b/0001-Fix-broken-test-1335.patch @@ -0,0 +1,39 @@ +From 585f6262fdd8467a689397607a438a73ab2fdf47 Mon Sep 17 00:00:00 2001 +From: Sorin Sbarnea +Date: Mon, 30 Mar 2020 11:20:31 +0100 +Subject: [PATCH] Fix broken test (#1335) + +Fixed broken tests, probably caused by a change that was merged +without waiting for CI results. + +diff --git a/tests/test_cli.py b/tests/test_cli.py +index ab5a3ae..3c54e3d 100644 +--- a/tests/test_cli.py ++++ b/tests/test_cli.py +@@ -390,7 +390,7 @@ def test_cli_extra_context_invalid_format(cli_runner): + '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 --git a/tests/test_cookiecutter_invocation.py b/tests/test_cookiecutter_invocation.py +index 49c8919..f84177c 100644 +--- a/tests/test_cookiecutter_invocation.py ++++ b/tests/test_cookiecutter_invocation.py +@@ -23,8 +23,8 @@ def test_should_raise_error_without_template_arg(monkeypatch, capfd): + subprocess.check_call([sys.executable, '-m', 'cookiecutter.cli']) + + _, err = capfd.readouterr() +- exp_message = 'Error: Missing argument "TEMPLATE".' +- assert exp_message in err ++ exp_message = "Error: Missing argument" ++ assert exp_message in err and "TEMPLATE" in err + + + @pytest.fixture +-- +2.26.2 + diff --git a/python-cookiecutter.spec b/python-cookiecutter.spec index 04a1079..6843f66 100644 --- a/python-cookiecutter.spec +++ b/python-cookiecutter.spec @@ -1,7 +1,7 @@ %global pkgname cookiecutter Name: python-cookiecutter -Version: 1.7.2 +Version: 1.7.0 Release: 1%{?dist} Summary: CLI utility to create projects from templates License: BSD @@ -9,6 +9,9 @@ URL: https://github.com/audreyr/cookiecutter Source0: https://github.com/audreyr/%{pkgname}/archive/%{version}.tar.gz BuildArch: noarch +#https://github.com/cookiecutter/cookiecutter/pull/1335 +Patch0: 0001-Fix-broken-test-1335.patch + BuildRequires: git BuildRequires: python3-devel BuildRequires: python3-click @@ -30,10 +33,11 @@ BuildRequires: python3-pytest-mock BuildRequires: python3-pytest-catchlog BuildRequires: python3-freezegun BuildRequires: python3-jinja2 +BuildRequires: python3-whichcraft %description -A command-line utility that creates projects from cookiecutters (project -templates), e.g. creating a Python package project from a Python package +A command-line utility that creates projects from cookiecutters project +templates, e.g. creating a Python package project from a Python package project template. %package -n python-%{pkgname}-doc @@ -51,7 +55,7 @@ Requires: python3-jinja2 Requires: python3-jinja2-time Requires: python3-poyo Requires: python3-requests -# Requires: python3-whichcraft +Requires: python3-whichcraft %{?python_provide:%python_provide python3-%{pkgname}} %description -n python3-%{pkgname} A command-line utility that creates projects from cookiecutters (project @@ -60,11 +64,13 @@ project template. %prep -%autosetup -n %{pkgname}-%{version} +%setup -q -n %{pkgname}-%{version} +%patch0 -p1 # fix invocation of /usr/bin/python sed -i 's#python -c#%{__python3} -c#' Makefile + %build %{py3_build} @@ -89,8 +95,8 @@ make docs %doc *.md %changelog -* Mon Aug 03 2020 Chedi Toueiti - 1.7.2-1 -- Update to version 1.7.2 +* Fri Aug 07 2020 Chedi Toueiti - 1.7.0-1 +- Update to version 1.7.0 * Wed Jul 29 2020 Fedora Release Engineering - 1.6.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 9de1e49..46af263 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (1.7.2.tar.gz) = 15cc145f143b4cac6e78b12e1c29e191d0c1c96b0187db05a4c8aac18310a5cb31d912073674ef4c01727c9b5a3b67f8c508842cb625db338b4034faa52a4a4c +SHA512 (1.7.0.tar.gz) = 2840a3e4c3072f76f79965d29bf9774f79d9f641a1ee96e3b8fdb714f67fd2e1f34020e148767759a083bff67f31f7cab2de311eeaf8a816d12b128b40563c19