forked from pool/python-towncrier
- Add patch support-click-8.2.patch: * Support Click 8.2+ changes. - Add patch fix-cli-test-fails-with-yes.patch: * Invoke ourselves with --yes to avoid interactive prompts. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-towncrier?expand=0&rev=11
92 lines
2.9 KiB
RPMSpec
92 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package python-towncrier
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
#
|
|
# 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: python-towncrier
|
|
Version: 24.8.0
|
|
Release: 0
|
|
Summary: Building newsfiles for your project
|
|
License: MIT
|
|
URL: https://github.com/twisted/towncrier
|
|
Source: https://files.pythonhosted.org/packages/source/t/towncrier/towncrier-%{version}.tar.gz
|
|
# PATCH-FIX-UPSTREAM Based on gh#twisted/towncrier#709/commits/2fee0e7f103161175424867c9716339a196bc957
|
|
Patch0: support-click-8.2.patch
|
|
# PATCH-FIX-UPSTREAM Based on gh#twisted/towncrier#709/commits/de71f131cd845ba76ae288292d7c3338716b82fd
|
|
Patch1: fix-cli-test-fails-with-yes.patch
|
|
BuildRequires: %{python_module Jinja2}
|
|
BuildRequires: %{python_module click}
|
|
BuildRequires: %{python_module hatchling}
|
|
BuildRequires: %{python_module importlib-metadata >= 4.6 if %python-base < 3.10}
|
|
BuildRequires: %{python_module importlib-resources >= 5 if %python-base < 3.10}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module tomli if %python-base < 3.11}
|
|
BuildRequires: fdupes
|
|
BuildRequires: git-core
|
|
BuildRequires: python-rpm-macros
|
|
Requires: git-core
|
|
Requires: python-Jinja2
|
|
Requires: python-click
|
|
%if 0%{?python_version_nodots} < 310
|
|
Requires: python-importlib-metadata >= 4.6
|
|
Requires: python-importlib-resources >= 5
|
|
%endif
|
|
%if 0%{?python_version_nodots} < 311
|
|
Requires: python-tomli
|
|
%endif
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module Twisted}
|
|
BuildRequires: %{python_module pytest}
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
Building newsfiles for your project.
|
|
|
|
%prep
|
|
%autosetup -p1 -n towncrier-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_clone -a %{buildroot}%{_bindir}/towncrier
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
export LANG=en_US.UTF-8
|
|
%pytest
|
|
|
|
%post
|
|
%python_install_alternative towncrier
|
|
|
|
%postun
|
|
%python_uninstall_alternative towncrier
|
|
|
|
%files %{python_files}
|
|
%doc NEWS.rst README.rst
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/towncrier
|
|
%{python_sitelib}/towncrier
|
|
%{python_sitelib}/towncrier-%{version}.dist-info
|
|
|
|
%changelog
|