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