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