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}
15 Group: Libraries/Python
16 Source0: https://github.com/pallets/click/archive/%{version}.tar.gz
17 # Source0-md5: 1c000f4357bd04e49af568b51bc03c6a
18 URL: http://click.pocoo.org/
19 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
20 BuildRequires: glibc-localedb-all
23 BuildRequires: python-modules >= 2
24 BuildRequires: python-pytest
25 BuildRequires: python-setuptools
26 %{?with_doc:BuildRequires: python-pallets-sphinx-themes}
29 BuildRequires: python3-modules >= 1:3.2
30 BuildRequires: python3-pytest
31 BuildRequires: python3-setuptools
32 %{?with_doc:BuildRequires: python3-pallets-sphinx-themes}
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
37 BuildRequires: sphinx-pdg-2
39 Requires: python-modules >= 2
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 click is a Python package for creating beautiful command line
45 interfaces in a composable way with as little amount of code as
46 necessary. It's the "Command Line Interface Creation Kit". It's highly
47 configurable but comes with good defaults out of the box.
49 %description -l pl.UTF-8
50 click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
51 w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
52 Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
53 (zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
54 konfigurowalny, ale ma dobre ustawienia domyślne.
56 %package -n python3-%{module}
57 Summary: A simple wrapper around optparse for powerful command line utilities
58 Summary(pl.UTF-8): Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
59 Group: Libraries/Python
60 Requires: python3-modules >= 1:3.2
62 %description -n python3-%{module}
63 click is a Python 3 package for creating beautiful command line
64 interfaces in a composable way with as little amount of code as
65 necessary. It's the "Command Line Interface Creation Kit". It's highly
66 configurable but comes with good defaults out of the box.
68 %description -n python3-%{module} -l pl.UTF-8
69 click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
70 w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
71 Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
72 (zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
73 konfigurowalny, ale ma dobre ustawienia domyślne.
76 Summary: Documentation for Python click module
77 Summary(pl.UTF-8): Dokumentacja do modułu Pythona click
81 Documentation for Python click module.
83 %description apidocs -l pl.UTF-8
84 Dokumentacja do modułu Pythona click.
87 %setup -q -n %{module}-%{version}
93 PYTHONPATH=$(pwd) %{__python} -m pytest tests --tb=long --verbose
100 LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) %{__python3} -m pytest tests --tb=long --verbose
105 # click-specific code is not python3 ready
107 %{__make} -C docs html \
108 SPHINXBUILD=sphinx-build-2
112 rm -rf $RPM_BUILD_ROOT
124 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
129 %doc CHANGES.rst LICENSE.rst README.rst
130 %{py_sitescriptdir}/%{module}
131 %{py_sitescriptdir}/Click-%{version}-py*.egg-info
135 %files -n python3-%{module}
136 %defattr(644,root,root,755)
137 %doc CHANGES.rst LICENSE.rst README.rst
138 %{py3_sitescriptdir}/%{module}
139 %{py3_sitescriptdir}/Click-%{version}-py*.egg-info
144 %defattr(644,root,root,755)
145 %doc docs/_build/html/{_static,*.html,*.js}