]> git.pld-linux.org Git - packages/python3-click.git/blame - python-click.spec
- release 2 (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}
d1fab06f 12Version: 7.1.2
92ca74da 13Release: 2
70e5f34b
ER
14License: BSD
15Group: Libraries/Python
881f79ba 16#Source0Download: https://github.com/pallets/click/releases
d1fab06f
JB
17Source0: https://github.com/pallets/click/archive/%{version}/click-%{version}.tar.gz
18# Source0-md5: 11aa3cff9c99caadb2574fca12aabbdc
19URL: https://click.palletsprojects.com/
881f79ba 20%if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
d18f22df
JB
21BuildRequires: glibc-localedb-all
22%endif
70e5f34b 23%if %{with python2}
a4e91394 24BuildRequires: python-modules >= 1:2.7
70e5f34b
ER
25BuildRequires: python-pytest
26BuildRequires: python-setuptools
27%endif
28%if %{with python3}
a4e91394 29BuildRequires: python3-modules >= 1:3.5
70e5f34b
ER
30BuildRequires: python3-pytest
31BuildRequires: python3-setuptools
32%endif
d18f22df
JB
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35%if %{with doc}
d1fab06f
JB
36BuildRequires: sphinx-pdg-3
37BuildRequires: python3-pallets-sphinx-themes
d18f22df 38%endif
a4e91394 39Requires: python-modules >= 1:2.7
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
a4e91394 60Requires: python3-modules >= 1:3.5
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
d1fab06f 92
70e5f34b 93%if %{with tests}
d1fab06f
JB
94LC_ALL=C.UTF-8 \
95PYTHONPATH=$(pwd)/src \
96%{__python} -m pytest tests --tb=long --verbose
70e5f34b
ER
97%endif
98%endif
99
100%if %{with python3}
101%py3_build
d1fab06f 102
70e5f34b 103%if %{with tests}
d1fab06f
JB
104PYTHONPATH=$(pwd)/src \
105%{__python3} -m pytest tests --tb=long --verbose
70e5f34b
ER
106%endif
107%endif
108
d18f22df 109%if %{with doc}
d1fab06f 110PYTHONPATH=$(pwd)/src \
d18f22df 111%{__make} -C docs html \
d1fab06f 112 SPHINXBUILD=sphinx-build-3
d18f22df
JB
113%endif
114
70e5f34b
ER
115%install
116rm -rf $RPM_BUILD_ROOT
d18f22df 117
70e5f34b
ER
118%if %{with python2}
119%py_install
d1fab06f 120
70e5f34b
ER
121%py_postclean
122%endif
123
124%if %{with python3}
125%py3_install
126%endif
127
128%clean
129rm -rf $RPM_BUILD_ROOT
130
131%if %{with python2}
132%files
133%defattr(644,root,root,755)
980d36a0 134%doc CHANGES.rst LICENSE.rst README.rst
d1fab06f
JB
135%{py_sitescriptdir}/click
136%{py_sitescriptdir}/click-%{version}-py*.egg-info
70e5f34b
ER
137%endif
138
139%if %{with python3}
140%files -n python3-%{module}
141%defattr(644,root,root,755)
980d36a0 142%doc CHANGES.rst LICENSE.rst README.rst
d1fab06f
JB
143%{py3_sitescriptdir}/click
144%{py3_sitescriptdir}/click-%{version}-py*.egg-info
70e5f34b 145%endif
d18f22df
JB
146
147%if %{with doc}
148%files apidocs
149%defattr(644,root,root,755)
150%doc docs/_build/html/{_static,*.html,*.js}
151%endif
This page took 0.422159 seconds and 4 git commands to generate.