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