source: projects/specs/trunk/p/python-wheel/python-wheel-vl.spec @ 12469

Revision 12469, 6.9 KB checked in by tomop, 4 years ago (diff)

python-3.8.5 and related packages.

Line 
1%bcond_with bootstrap
2%bcond_without python2
3%bcond_without python3
4%bcond_with signatures
5%bcond_without tool
6%bcond_with test
7
8%global pypi_name wheel
9
10Name:           python-%{pypi_name}
11Version:        0.35.0
12Release:        1%{?_dist_release}
13Summary:        A built-package format for Python
14Group:          programming
15Vendor:         Project Vine
16Distribution:   Vine Linux
17
18License:        MIT
19URL:            https://bitbucket.org/pypa/wheel
20Source0:        https://files.pythonhosted.org/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
21BuildArch:      noarch
22
23BuildRequires:  python-rpm-macros
24
25%if %{with python2}
26BuildRequires:  python-devel
27BuildRequires:  python2-setuptools
28%if ! %{with bootstrap}
29%if %{with test}
30BuildRequires:  python3-pytest
31BuildRequires:  python-jsonschema
32%endif
33%if %{with signatures}
34BuildRequires:  pyxdg
35BuildRequires:  python-keyring
36%endif
37%endif
38%{?python_provide:%python_provide python2-%{pypi_name}}
39%endif
40
41%if %{with python3}
42BuildRequires:  python3-devel
43BuildRequires:  python3-setuptools
44BuildRequires:  python3-rpm-macros
45%if ! %{with bootstrap}
46%if %{with test}
47BuildRequires:  python3-pytest
48BuildRequires:  python3-jsonschema
49%endif
50%if %{with signatures}
51BuildRequires:  python3-pyxdg
52BuildRequires:  python3-keyring
53%endif
54%endif
55%endif
56
57%global _description \
58A built-package format for Python.\
59\
60A wheel is a ZIP-format archive with a specially formatted filename and the\
61.whl extension. It is designed to contain all the files for a PEP 376\
62compatible install in a way that is very close to the on-disk format.
63
64%description %{_description}
65
66Python 2 version.
67
68
69%if %{with python3}
70%package -n     python3-%{pypi_name}
71Summary:        %{summary}
72Group:          programming
73BuildRequires:  python3-devel
74BuildRequires:  python3-setuptools
75%if ! %{with bootstrap}
76%if %{with test}
77BuildRequires:  python3-pytest
78BuildRequires:  python3-jsonschema
79%endif
80%if %{with signatures}
81BuildRequires:  python3-pyxdg
82BuildRequires:  python3-keyring
83%endif
84%endif
85%{?python_provide:%python_provide python3-%{pypi_name}}
86
87%description -n python3-%{pypi_name} %{_description}
88
89Python 3 version.
90%endif
91
92
93%prep
94%setup -q -n %{pypi_name}-%{version}
95
96
97%build
98%if %{with python2}
99%py_build
100%endif
101%if %{with python3}
102%py3_build
103%endif
104
105
106%install
107rm -rf %{buildroot}
108
109%if %{with python2}
110%py_install
111%if %{with tool}
112mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python_version}}
113ln -s %{pypi_name}-%{python_version} %{buildroot}%{_bindir}/%{pypi_name}-2
114%endif
115%endif
116
117%if %{with python3}
118%py3_install
119%if %{with tool}
120mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
121ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
122%endif
123%endif
124
125
126%if %{with test}
127%check
128rm -f setup.cfg
129%if %{with python2}
130PYTHONPATH=%{buildroot}%{python_sitelib} py.test-2 -v --ignore build
131%endif
132%if %{with python3}
133PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
134%endif
135%endif
136
137
138%if %{with python2}
139%pre
140if [ ! -L %{_bindir}/%{pypi_name} ]; then
141  rm -f %{_bindir}/%{pypi_name}
142fi
143
144%post
145/sbin/update-alternatives \
146  --install %{_bindir}/%{pypi_name} %{pypi_name} \
147  %{_bindir}/%{pypi_name}-%{python_version} %{python_version_nodots}
148
149%preun
150if [ "$1" = 0 ]; then
151  /sbin/update-alternatives \
152    --remove %{pypi_name} %{_bindir}/%{pypi_name}-%{python_version}
153fi
154%endif
155
156%if %{with python3}
157%pre -n python3-%{pypi_name}
158if [ ! -L %{_bindir}/%{pypi_name} ]; then
159  rm -f %{_bindir}/%{pypi_name}
160fi
161
162%post -n python3-%{pypi_name}
163/sbin/update-alternatives \
164  --install %{_bindir}/%{pypi_name} %{pypi_name} \
165  %{_bindir}/%{pypi_name}-%{python3_version} %{python3_version_nodots}
166
167%preun -n python3-%{pypi_name}
168if [ "$1" = 0 ]; then
169  /sbin/update-alternatives \
170    --remove %{pypi_name} %{_bindir}/%{pypi_name}-%{python3_version}
171fi
172%endif
173
174
175%if %{with python2}
176%files
177%license LICENSE.txt
178%doc CHANGES.txt README.txt
179%if %{with tool}
180%{_bindir}/%{pypi_name}-2
181%{_bindir}/%{pypi_name}-%{python_version}
182%endif
183%{python_sitelib}/%{pypi_name}*
184%exclude %{python_sitelib}/%{pypi_name}/test
185%endif
186
187%if %{with python3}
188%files -n python3-%{pypi_name}
189%license LICENSE.txt
190%doc CHANGES.txt README.txt
191%if %{with tool}
192%{_bindir}/%{pypi_name}-3
193%{_bindir}/%{pypi_name}-%{python3_version}
194%endif
195%{python3_sitelib}/%{pypi_name}*
196%exclude %{python3_sitelib}/%{pypi_name}/test
197%endif
198
199
200%changelog
201* Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.35.0-1
202- new upstream release.
203
204* Mon Dec 18 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.30.0a0-8
205- initial build for Vine Linux.
206
207* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0a0-7
208- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
209
210* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0a0-6
211- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
212
213* Tue Jan 03 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-5
214- Enable tests
215
216* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-4
217- Rebuild for Python 3.6 without tests
218
219* Tue Dec 06 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.30.0a0-3
220- Add bootstrap method
221
222* Mon Sep 19 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-2
223- Use the python_provide macro
224
225* Mon Sep 19 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-1
226- Update to 0.30.0a0
227- Added patch to remove keyrings.alt dependency
228
229* Wed Aug 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.29.0-1
230- Update to 0.29.0
231- Cleanups and fixes
232
233* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26.0-3
234- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
235
236* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
237- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
238
239* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 0.26.0-1
240- Update to 0.26.0
241- Rebuilt for Python3.5 rebuild
242
243* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.24.0-4
244- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
245
246* Tue Jan 13 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.24.0-3
247- Make spec buildable in EPEL 6, too.
248- Remove additional sources added to upstream tarball.
249
250* Sat Jan 03 2015 Matej Cepl <mcepl@redhat.com> - 0.24.0-2
251- Make python3 conditional (switched off for RHEL-7; fixes #1131111).
252
253* Mon Nov 10 2014 Slavek Kabrda <bkabrda@redhat.com> - 0.24.0-1
254- Update to 0.24.0
255- Remove patches merged upstream
256
257* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22.0-4
258- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
259
260* Fri Apr 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 0.22.0-3
261- Another rebuild with python 3.4
262
263* Fri Apr 18 2014 Matej Stuchlik <mstuchli@redhat.com> - 0.22.0-2
264- Rebuild with python 3.4
265
266* Thu Nov 28 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.22.0-1
267- Initial package.
Note: See TracBrowser for help on using the repository browser.