]> git.pld-linux.org Git - packages/python-click.git/blame - python-click.spec
- up to 7.0
[packages/python-click.git] / python-click.spec
CommitLineData
70e5f34b
ER
1#
2# Conditional build:
d18f22df
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # py.test tests
70e5f34b
ER
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module click
9Summary: A simple wrapper around optparse for powerful command line utilities
d18f22df 10Summary(pl.UTF-8): Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
70e5f34b 11Name: python-%{module}
980d36a0
AM
12Version: 7.0
13Release: 1
70e5f34b
ER
14License: BSD
15Group: Libraries/Python
6aa8f0e7 16Source0: https://github.com/pallets/click/archive/%{version}.tar.gz
980d36a0 17# Source0-md5: 1c000f4357bd04e49af568b51bc03c6a
6aa8f0e7 18URL: http://click.pocoo.org/
d18f22df
JB
19%if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
20BuildRequires: glibc-localedb-all
21%endif
70e5f34b 22%if %{with python2}
d18f22df 23BuildRequires: python-modules >= 2
70e5f34b
ER
24BuildRequires: python-pytest
25BuildRequires: python-setuptools
980d36a0 26%{?with_doc:BuildRequires: python-pallets-sphinx-themes}
70e5f34b
ER
27%endif
28%if %{with python3}
d18f22df 29BuildRequires: python3-modules >= 1:3.2
70e5f34b
ER
30BuildRequires: python3-pytest
31BuildRequires: python3-setuptools
980d36a0 32%{?with_doc:BuildRequires: python3-pallets-sphinx-themes}
70e5f34b 33%endif
d18f22df
JB
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
36%if %{with doc}
37BuildRequires: sphinx-pdg-2
38%endif
39Requires: python-modules >= 2
70e5f34b
ER
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44click is a Python package for creating beautiful command line
45interfaces in a composable way with as little amount of code as
46necessary. It's the "Command Line Interface Creation Kit". It's highly
47configurable but comes with good defaults out of the box.
48
d18f22df
JB
49%description -l pl.UTF-8
50click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
51w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
52Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
53(zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
54konfigurowalny, ale ma dobre ustawienia domyślne.
55
70e5f34b
ER
56%package -n python3-%{module}
57Summary: A simple wrapper around optparse for powerful command line utilities
d18f22df 58Summary(pl.UTF-8): Proste obudowanie optparse do tworzenia potężnych narzędzi linii poleceń
70e5f34b 59Group: Libraries/Python
d18f22df 60Requires: python3-modules >= 1:3.2
70e5f34b
ER
61
62%description -n python3-%{module}
63click is a Python 3 package for creating beautiful command line
64interfaces in a composable way with as little amount of code as
65necessary. It's the "Command Line Interface Creation Kit". It's highly
66configurable but comes with good defaults out of the box.
67
d18f22df
JB
68%description -n python3-%{module} -l pl.UTF-8
69click to pakiet Pythona do tworzenia ładnych interfejsów linii poleceń
70w uporządkowany sposób, przy użyciu jak najmniejszej ilości kodu.
71Nazwa "click" pochodzi od "Command Line Interface Creation Kit"
72(zestaw do tworzenia interfejsu linii poleceń). Jest wysoce
73konfigurowalny, ale ma dobre ustawienia domyślne.
74
75%package apidocs
76Summary: Documentation for Python click module
77Summary(pl.UTF-8): Dokumentacja do modułu Pythona click
78Group: Documentation
79
80%description apidocs
81Documentation for Python click module.
82
83%description apidocs -l pl.UTF-8
84Dokumentacja do modułu Pythona click.
85
70e5f34b
ER
86%prep
87%setup -q -n %{module}-%{version}
88
89%build
90%if %{with python2}
91%py_build
92%if %{with tests}
78c2316c 93PYTHONPATH=$(pwd) %{__python} -m pytest tests --tb=long --verbose
70e5f34b
ER
94%endif
95%endif
96
97%if %{with python3}
98%py3_build
99%if %{with tests}
78c2316c 100LC_ALL=C.UTF-8 PYTHONPATH=$(pwd) %{__python3} -m pytest tests --tb=long --verbose
70e5f34b
ER
101%endif
102%endif
103
d18f22df
JB
104%if %{with doc}
105# click-specific code is not python3 ready
980d36a0 106PYTHONPATH=$(pwd) \
d18f22df
JB
107%{__make} -C docs html \
108 SPHINXBUILD=sphinx-build-2
109%endif
110
70e5f34b
ER
111%install
112rm -rf $RPM_BUILD_ROOT
d18f22df 113
70e5f34b
ER
114%if %{with python2}
115%py_install
116%py_postclean
117%endif
118
119%if %{with python3}
120%py3_install
121%endif
122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
126%if %{with python2}
127%files
128%defattr(644,root,root,755)
980d36a0 129%doc CHANGES.rst LICENSE.rst README.rst
70e5f34b 130%{py_sitescriptdir}/%{module}
980d36a0 131%{py_sitescriptdir}/Click-%{version}-py*.egg-info
70e5f34b
ER
132%endif
133
134%if %{with python3}
135%files -n python3-%{module}
136%defattr(644,root,root,755)
980d36a0 137%doc CHANGES.rst LICENSE.rst README.rst
70e5f34b 138%{py3_sitescriptdir}/%{module}
980d36a0 139%{py3_sitescriptdir}/Click-%{version}-py*.egg-info
70e5f34b 140%endif
d18f22df
JB
141
142%if %{with doc}
143%files apidocs
144%defattr(644,root,root,755)
145%doc docs/_build/html/{_static,*.html,*.js}
146%endif
This page took 1.845913 seconds and 4 git commands to generate.