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