cookiecutter/cookiecutter.spec
Sebastian Wagner c606da9576 - update to version 2.2.3:
- Changes:
 - Minor Changes:
  - Add support for adding human-readable labels for choices when defining multiple choices questions (#1898) @vemonet
  - Prompt with replay file (#1758) @w1ndblow
 - CI/CD and QA changes:
  - Set cookiecutter/VERSION.txt as source of truth for version number (#1896) @ericof
  - [pre-commit.ci] pre-commit autoupdate (#1897) @pre-commit-ci
 - Bugfixes:
  - Fix issue where the prompts dict was not passed for yes_no questions (#1895) @vemonet
  - Set cookiecutter/VERSION.txt as source of truth for version number (#1896) @ericof
- update to version 2.2.2:
 - CI/CD and QA changes:
  - Improve gitignore (#1889) @audreyfeldroy
  - Add warning for jinja2_time (#1890) @henryiii
- update to version 2.2.0:
 - Changes:
  - Added timeout on request.get() for ensuring that if a recipient serve… (#1772) @openrefactory
  - Fixing Carriage Return Line Feed (CRLF) order in docs #1792 (#1793) @Lahiry
  - Reduce I/O (#1877) @kurtmckee
  - Remove a pre-commit hook special case (#1875) @kurtmckee
  - Remove universal bdist_wheel option; use "python -m build" (#1739) @mwtoews
  - Remove unused import from post-generate hook script example (#1795) @KAZYPinkSaurus
  - Standardize newlines for all platforms (#1870) @kurtmckee
  - feat: Add resolved template repository path as _repo_dir to the context (#1771) @tmeckel
 - Minor Changes:
  - Added support for providing human-readable prompts to the different variables (#1881) @vemonet
  - Added: Boolean variable support in JSON (#1626) @liortct
  - Added: CLI option to keep project files on failure. (#1669) @MaciejPatro
  - Added: Support partially overwrite keys in nested dict (#1692) @cksac

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/cookiecutter?expand=0&rev=27
2023-07-16 10:12:22 +00:00

150 lines
5.3 KiB
RPMSpec

#
# spec file for package cookiecutter
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2017 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: cookiecutter
Version: 2.2.3
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
Source: https://github.com/cookiecutter/cookiecutter/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# recent versions are not published on PyPI: https://github.com/cookiecutter/cookiecutter/issues/1636
#Source: https://files.pythonhosted.org/packages/source/c/cookiecutter/cookiecutter-%%{version}.tar.gz
Source1: ccext.py
BuildRequires: %{python_module Jinja2 >= 2.7 with %python-Jinja2 < 4}
BuildRequires: %{python_module binaryornot >= 0.2.0}
BuildRequires: %{python_module click >= 7 with %python-click < 9}
BuildRequires: %{python_module future >= 0.15.2}
BuildRequires: %{python_module jinja2-time >= 0.1.0}
BuildRequires: %{python_module poyo >= 0.1.0}
BuildRequires: %{python_module python-slugify}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module whichcraft >= 0.4.0}
BuildRequires: fdupes
BuildRequires: git-core
BuildRequires: python-rpm-macros
Requires: git-core
Requires: python-PyYAML
Requires: python-binaryornot >= 0.2.0
Requires: python-future >= 0.15.2
Requires: python-jinja2-time >= 0.1.0
Requires: python-poyo >= 0.1.0
Requires: python-python-slugify
Requires: python-requests >= 2.18.0
Requires: python-whichcraft >= 0.4.0
Requires: (python-Jinja2 >= 2.7 with python-Jinja2 < 4)
Requires: (python-click >= 7 with python-click < 9)
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
# SECTION Testing requirements
BuildRequires: %{python_module chardet >= 2.0.0}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.18.0}
# /SECTION
# SECTION Documentation requirements
BuildRequires: python3-Sphinx
BuildRequires: python3-myst-parser
BuildRequires: python3-sphinx-autodoc-typehints
BuildRequires: python3-sphinx-click
BuildRequires: python3-sphinxcontrib-apidoc
%if 0%{?sle_version} == 150300
BuildRequires: python3-commonmark
%endif
BuildRequires: python3-recommonmark
# /SECTION
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
Provides: cookiecutter = %{version}-%{release}
Obsoletes: cookiecutter < %{version}-%{release}
%endif
%python_subpackages
%package -n cookiecutter-doc
Summary: Documentation files for %{name}
Group: Documentation/HTML
%description
A command-line utility that creates projects from cookiecutters (project
templates), e.g. creating a Python package project from a Python package
project template.
Project templates can be in any programming language or markup format.
%description -n cookiecutter-doc
A command-line utility that creates projects from cookiecutters (project
templates), e.g. creating a Python package project from a Python package
project template.
This package contains the documentation for cookiecutter.
%prep
%autosetup -p1 -n cookiecutter-%{version}
cp %{SOURCE1} docs
# Remove pytest addopts:
rm setup.cfg
%build
%python_build
pushd docs
sphinx-build -b html -d .build/doctrees . _build/html
rm _build/html/.buildinfo
popd
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/cookiecutter
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# the doc directive in the files section cannot deduplicate, so do it manually
mkdir -p %{buildroot}%{_docdir}/cookiecutter-doc
cp -r docs/_build/html %{buildroot}%{_docdir}/cookiecutter-doc/
%fdupes %{buildroot}%{_docdir}/cookiecutter-doc
%check
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# test_generate_file_verbose_template_syntax_error: reported at https://github.com/cookiecutter/cookiecutter/issues/1655
%pytest tests -k 'not test_generate_file_verbose_template_syntax_error'
%pre
# delete command if the old package was not update-alternatives controlled
[ -h %{_bindir}/cookiecutter ] || rm -f %{_bindir}/cookiecutter
%post
%python_install_alternative cookiecutter
%postun
%python_uninstall_alternative cookiecutter
%files %{python_files}
%license LICENSE
%python_alternative cookiecutter
%{python_sitelib}/cookiecutter
%{python_sitelib}/cookiecutter-%{version}*-info
%files -n cookiecutter-doc
%license LICENSE
%doc %{_docdir}/cookiecutter-doc
%changelog