3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # py.test tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: A simple wrapper around optparse for powerful command line utilities
10 Summary(pl.UTF-8): Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
11 Name: python-%{module}
12 # keep 7.x here for python2 support
16 Group: Libraries/Python
17 #Source0Download: https://github.com/pallets/click/releases
18 Source0: https://github.com/pallets/click/archive/%{version}/click-%{version}.tar.gz
19 # Source0-md5: 11aa3cff9c99caadb2574fca12aabbdc
20 URL: https://click.palletsprojects.com/
21 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
22 BuildRequires: glibc-localedb-all
25 BuildRequires: python-modules >= 1:2.7
26 BuildRequires: python-pytest
27 BuildRequires: python-setuptools
30 BuildRequires: python3-modules >= 1:3.5
31 BuildRequires: python3-pytest
32 BuildRequires: python3-setuptools
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
37 BuildRequires: sphinx-pdg-3 >= 2.4.4
38 BuildRequires: python3-pallets-sphinx-themes >= 1.2.3
39 BuildRequires: python3-sphinxcontrib-log-cabinet >= 1.0.1
40 BuildRequires: python3-sphinx_issues >= 1.2.0
42 Requires: python-modules >= 1:2.7
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 click is a Python package for creating beautiful command line
48 interfaces in a composable way with as little amount of code as
49 necessary. It's the "Command Line Interface Creation Kit". It's highly
50 configurable but comes with good defaults out of the box.
52 %description -l pl.UTF-8
53 click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
54 w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
55 Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
56 (zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
57 konfigurowalny, ale ma dobre ustawienia domyślne.
59 %package -n python3-%{module}
60 Summary: A simple wrapper around optparse for powerful command line utilities
61 Summary(pl.UTF-8): Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
62 Group: Libraries/Python
63 Requires: python3-modules >= 1:3.5
65 %description -n python3-%{module}
66 click is a Python 3 package for creating beautiful command line
67 interfaces in a composable way with as little amount of code as
68 necessary. It's the "Command Line Interface Creation Kit". It's highly
69 configurable but comes with good defaults out of the box.
71 %description -n python3-%{module} -l pl.UTF-8
72 click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
73 w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
74 Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
75 (zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
76 konfigurowalny, ale ma dobre ustawienia domyślne.
79 Summary: Documentation for Python click module
80 Summary(pl.UTF-8): Dokumentacja do modułu Pythona click
84 Documentation for Python click module.
86 %description apidocs -l pl.UTF-8
87 Dokumentacja do modułu Pythona click.
90 %setup -q -n %{module}-%{version}
98 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
99 PYTHONPATH=$(pwd)/src \
100 %{__python} -m pytest tests --tb=long --verbose
108 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
109 PYTHONPATH=$(pwd)/src \
110 %{__python3} -m pytest tests --tb=long --verbose
115 PYTHONPATH=$(pwd)/src \
116 %{__make} -C docs html \
117 SPHINXBUILD=sphinx-build-3
121 rm -rf $RPM_BUILD_ROOT
134 rm -rf $RPM_BUILD_ROOT
138 %defattr(644,root,root,755)
139 %doc CHANGES.rst LICENSE.rst README.rst
140 %{py_sitescriptdir}/click
141 %{py_sitescriptdir}/click-%{version}-py*.egg-info
145 %files -n python3-%{module}
146 %defattr(644,root,root,755)
147 %doc CHANGES.rst LICENSE.rst README.rst
148 %{py3_sitescriptdir}/click
149 %{py3_sitescriptdir}/click-%{version}-py*.egg-info
154 %defattr(644,root,root,755)
155 %doc docs/_build/html/{_static,*.html,*.js}