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 #Source0Download: https://github.com/pallets/click/releases
18 #Source0: https://github.com/pallets/click/archive/%{version}/click-%{version}.tar.gz
19 Source0: https://github.com/pallets/click/archive/%{version}.tar.gz
20 # Source0-md5: 1c000f4357bd04e49af568b51bc03c6a
21 URL: http://click.pocoo.org/
22 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
23 BuildRequires: glibc-localedb-all
26 BuildRequires: python-modules >= 2
27 BuildRequires: python-pytest
28 BuildRequires: python-setuptools
29 %{?with_doc:BuildRequires: python-pallets-sphinx-themes}
32 BuildRequires: python3-modules >= 1:3.2
33 BuildRequires: python3-pytest
34 BuildRequires: python3-setuptools
35 %{?with_doc:BuildRequires: python3-pallets-sphinx-themes}
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
40 BuildRequires: sphinx-pdg-2
42 Requires: python-modules >= 2
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.2
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}
96 PYTHONPATH=$(pwd) %{__python} -m pytest tests --tb=long --verbose
103 LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) %{__python3} -m pytest tests --tb=long --verbose
108 # click-specific code is not python3 ready
110 %{__make} -C docs html \
111 SPHINXBUILD=sphinx-build-2
115 rm -rf $RPM_BUILD_ROOT
127 rm -rf $RPM_BUILD_ROOT
131 %defattr(644,root,root,755)
132 %doc CHANGES.rst LICENSE.rst README.rst
133 %{py_sitescriptdir}/%{module}
134 %{py_sitescriptdir}/Click-%{version}-py*.egg-info
138 %files -n python3-%{module}
139 %defattr(644,root,root,755)
140 %doc CHANGES.rst LICENSE.rst README.rst
141 %{py3_sitescriptdir}/%{module}
142 %{py3_sitescriptdir}/Click-%{version}-py*.egg-info
147 %defattr(644,root,root,755)
148 %doc docs/_build/html/{_static,*.html,*.js}