source: projects/specs/trunk/p/python-pip/python-pip-vl.spec @ 12545

Revision 12545, 6.3 KB checked in by tomop, 3 years ago (diff)

rpm-4.16.1.2-1 and requirements

Line 
1%bcond_with bootstrap
2%bcond_without python2
3%bcond_without python3
4
5%global srcname pip
6
7%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
8%if %{without bootstrap}
9%if %{with python2}
10%global python2_wheelname %python_wheelname
11%endif
12%if %{with python3}
13%global python3_wheelname %python_wheelname
14%endif
15%endif
16
17Summary:        Pip installs Python packages.  An easy_install replacement
18Summary(ja):    Pip は easy_install を置き換える Python パッケージインストーラです。
19Name:           python-%{srcname}
20Version:        20.3.4
21Release:        1%{?_dist_release}
22Group:          programming
23Vendor:         Project Vine
24Distribution:   Vine Linux
25
26License:        MIT
27URL:            https://pip.pypa.io/en/stable/
28Source0:        https://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz
29# # Patch until the following issue gets implemented upstream:
30# # https://github.com/pypa/pip/issues/1351
31# Patch0:         allow-stripping-given-prefix-from-wheel-RECORD-files.patch
32
33# # Downstream only patch
34# # Emit a warning to the user if pip install is run with root privileges
35# # Issue upstream: https://github.com/pypa/pip/issues/4288
36# Patch1:         emit-a-warning-when-running-with-root-privileges.patch
37BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
38
39BuildArch:      noarch
40BuildRequires:  python-rpm-macros
41
42%if %{with python2}
43BuildRequires:  python2-rpm-macros
44BuildRequires:  python-devel
45BuildRequires:  python-setuptools
46%if %{without bootstrap}
47BuildRequires:  python-pip
48BuildRequires:  python-wheel
49%endif
50Requires:       python-setuptools
51Requires(post,postun): alternatives
52%endif
53
54%if %{with python3}
55BuildRequires:  python3-rpm-macros
56BuildRequires:  python3-devel
57BuildRequires:  python3-setuptools
58%if %{without bootstrap}
59BuildRequires:  python3-pip
60BuildRequires:  python3-wheel
61%endif
62%endif
63
64%description
65pip is a package management system used to install and manage software packages
66written in Python. Many packages can be found in the Python Package Index
67(PyPI). pip is a recursive acronym that can stand for either "Pip Installs
68Packages" or "Pip Installs Python".
69
70
71%if %{with python3}
72%package -n     python3-%{srcname}
73Summary:        A tool for installing and managing Python3 packages
74Group:          programming
75Requires:       python3-setuptools
76Requires(post,postun): alternatives
77
78%description -n python3-%{srcname}
79pip is a package management system used to install and manage software packages
80written in Python. Many packages can be found in the Python Package Index
81(PyPI). pip is a recursive acronym that can stand for either "Pip Installs
82Packages" or "Pip Installs Python".
83%endif
84
85
86%prep
87%setup -q -n %{srcname}-%{version}
88
89
90%build
91%if %{with python2}
92%if %{without bootstrap}
93%py_build_wheel
94%else
95%py_build
96%endif
97%endif
98
99%if %{with python3}
100%if %{without bootstrap}
101%py3_build_wheel
102%else
103%py3_build
104%endif
105%endif # with python3
106
107
108%install
109%{__rm} -rf %{buildroot}
110
111%if %{with python3}
112%if %{without bootstrap}
113%py3_install_wheel %{python3_wheelname}
114%else
115%py3_install
116%endif
117rm %{buildroot}%{_bindir}/pip
118%endif # with python3
119
120%if %{with python2}
121%if %{without bootstrap}
122%py2_install_wheel %{python_wheelname}
123%else
124%py_install
125%endif
126rm %{buildroot}%{_bindir}/pip
127%endif # with python2
128
129
130%clean
131%{__rm} -rf %{buildroot}
132
133
134%if %{with python2}
135%pre
136if [ ! -L %{_bindir}/%{srcname} ]; then
137  rm -f %{_bindir}/%{srcname}
138fi
139
140%post
141/sbin/update-alternatives \
142  --install %{_bindir}/%{srcname} %{srcname} \
143  %{_bindir}/%{srcname}%{python_version} %{python_version_nodots}
144
145%preun
146if [ "$1" = 0 ]; then
147  /sbin/update-alternatives \
148    --remove %{srcname} %{_bindir}/%{srcname}%{python_version}
149fi
150%endif
151
152%if %{with python3}
153%pre -n python3-%{srcname}
154if [ ! -L %{_bindir}/%{srcname} ]; then
155  rm -f %{_bindir}/%{srcname}
156fi
157
158%post -n python3-%{srcname}
159/sbin/update-alternatives \
160  --install %{_bindir}/%{srcname} %{srcname} \
161  %{_bindir}/%{srcname}%{python3_version} %{python3_version_nodots}
162
163%preun -n python3-%{srcname}
164if [ "$1" = 0 ]; then
165  /sbin/update-alternatives \
166    --remove %{srcname} %{_bindir}/%{srcname}%{python3_version}
167fi
168%endif
169
170
171%if %{with python2}
172%files
173%defattr(-,root,root,-)
174%license LICENSE.txt
175%doc README.rst docs
176%attr(755,root,root) %{_bindir}/pip2*
177%{python_sitelib}/pip*
178%endif
179
180%if %{with python3}
181%files -n python3-pip
182%defattr(-,root,root,-)
183%license LICENSE.txt
184%doc README.rst docs
185%attr(755,root,root) %{_bindir}/pip3*
186%{python3_sitelib}/pip*
187%endif
188
189
190%changelog
191* Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.3.4-1
192- new upstream release.
193
194* Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.2.2-1
195- new upstream release.
196
197* Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.0.2-1
198- new upstream release.
199
200* Sat Oct 06 2018 Toshiaki Ara <ara_t@384.jp> 18.1-1
201- new upstream release.
202- drop Patches
203- change URL
204
205* Mon Dec 18 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
206- new upstream release.
207- made to use python{,3}-rpm-macros.
208- added a sub-package for python3.
209
210* Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.5.6-1
211- new upstream release
212- didn't rename pip to python-pip
213
214* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-3
215- rebuild with VineSeed environment
216
217* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-2
218- rebuild with python-2.7.2
219
220* Mon Nov 22 2010 Shu KONNO <owa@bg.wakwak.com> 0.8.1-1
221- updated pip to 0.8.1
222
223* Fri Sep 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8-1
224- initial build for Vine Linux
225
226* Mon Aug 30 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.8-1
227- update to 0.8 of pip
228* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-5
229- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
230
231* Wed Jul 7 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.2-1
232- update to 0.7.2 of pip
233* Sun May 23 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.1-1
234- update to 0.7.1 of pip
235* Fri Jan 1 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1.4
236- fix dependency issue
237* Fri Dec 18 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-2
238- fix spec file
239* Thu Dec 17 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-1
240- upgrade to 0.6.1 of pip
241* Mon Aug 31 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.4-1
242- Initial package
243
Note: See TracBrowser for help on using the repository browser.