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: 3cae45d064f341b3f373489d8f7745e9
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
28 BuildRequires: python3-modules >= 1:3.2
29 BuildRequires: python3-pytest
30 BuildRequires: python3-setuptools
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.714
35 BuildRequires: sphinx-pdg-2
37 Requires: python-modules >= 2
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 click is a Python package for creating beautiful command line
43 interfaces in a composable way with as little amount of code as
44 necessary. It's the "Command Line Interface Creation Kit". It's highly
45 configurable but comes with good defaults out of the box.
47 %description -l pl.UTF-8
48 click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
49 w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
50 Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
51 (zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
52 konfigurowalny, ale ma dobre ustawienia domyślne.
54 %package -n python3-%{module}
55 Summary: A simple wrapper around optparse for powerful command line utilities
56 Summary(pl.UTF-8): Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.2
60 %description -n python3-%{module}
61 click is a Python 3 package for creating beautiful command line
62 interfaces in a composable way with as little amount of code as
63 necessary. It's the "Command Line Interface Creation Kit". It's highly
64 configurable but comes with good defaults out of the box.
66 %description -n python3-%{module} -l pl.UTF-8
67 click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
68 w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
69 Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
70 (zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
71 konfigurowalny, ale ma dobre ustawienia domyślne.
74 Summary: Documentation for Python click module
75 Summary(pl.UTF-8): Dokumentacja do modułu Pythona click
79 Documentation for Python click module.
81 %description apidocs -l pl.UTF-8
82 Dokumentacja do modułu Pythona click.
85 %setup -q -n %{module}-%{version}
91 PYTHONPATH=$(pwd) %{__python} -m pytest tests --tb=long --verbose
98 LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) %{__python3} -m pytest tests --tb=long --verbose
103 # click-specific code is not python3 ready
104 %{__make} -C docs html \
105 SPHINXBUILD=sphinx-build-2
109 rm -rf $RPM_BUILD_ROOT
121 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %doc CHANGES LICENSE README
127 %{py_sitescriptdir}/%{module}
128 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
132 %files -n python3-%{module}
133 %defattr(644,root,root,755)
134 %doc CHANGES LICENSE README
135 %{py3_sitescriptdir}/%{module}
136 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
141 %defattr(644,root,root,755)
142 %doc docs/_build/html/{_static,*.html,*.js}