blob: 560c9e6dba02fba676c615039629627219065c5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Build system: setuptools.build_meta via pyproject.toml (no setup.py in source)
# topdir after --transform: rich-click-1.9.9
# module name: rich_click (src layout, setuptools auto-discovery)
# dynamic version via attr = "rich_click.__version__" → imports rich_click at build time
# rich_click/__init__.py imports click at module level, and the import chain
# reaches rich_help_rendering which imports rich.* → needs click + rich at build time
%global pypi_name rich-click
Name: python-%{pypi_name}
Version: 1.9.9
Release: 1%{?dist}
Summary: Format click help output nicely with rich
License: MIT
URL: https://github.com/ewels/rich-click
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
# pip3 wheel needs the 'bdist_wheel' setuptools command provided by wheel
BuildRequires: python3-wheel
# setuptools reads version via dynamic.version = {attr = "rich_click.__version__"},
# which imports rich_click.__init__ → needs click and rich at build time
BuildRequires: python3-click >= 8
BuildRequires: python3-rich >= 12
%description
rich-click provides attractive help output from Click, formatted with Rich,
with minimal customization required. It is a minimal Python module to combine
the efforts of the excellent packages 'rich' and 'click'.
%package -n python3-%{pypi_name}
Summary: Format click help output nicely with rich
Provides: python-%{pypi_name}
Provides: python3dist(%{pypi_name}) = %{version}
Provides: python3-%{pypi_name} = %{version}-%{release}
Requires: python3-click >= 8
Requires: python3-rich >= 12
%description -n python3-%{pypi_name}
rich-click provides attractive help output from Click, formatted with Rich,
with minimal customization required. It is a minimal Python module to combine
the efforts of the excellent packages 'rich' and 'click'.
%package help
Summary: Development documents and examples for %{pypi_name}
Provides: python3-%{pypi_name}-doc
BuildArch: noarch
Requires: python3-%{pypi_name}
%description help
This package provides documentation and examples for rich-click.
%prep
%autosetup -n %{pypi_name}-%{version} -p1
%build
pip3 wheel --no-build-isolation --no-deps --wheel-dir %{_builddir}/wheels .
%install
pip3 install --no-build-isolation --no-index \
--find-links %{_builddir}/wheels \
--root %{buildroot} --prefix /usr \
%{pypi_name}==%{version}
%files -n python3-%{pypi_name}
%license LICENSE
%{_bindir}/rich-click
%{python3_sitelib}/rich_click/
%{python3_sitelib}/rich_click-%{version}*.dist-info/
%files help
%license LICENSE
%doc README.md
%doc CHANGELOG.md
%changelog
* Mon Oct 26 2026 Python_Bot <Python_Bot@openeuler.org> - 1.9.9-1
- Initial package
|