1 |
joequant |
329022 |
# Created by pyp2rpm-1.0.0 |
2 |
|
|
%global pypi_name pip |
3 |
joequant |
484288 |
%define version 1.4.1 |
4 |
joequant |
329022 |
|
5 |
|
|
Name: python-pip |
6 |
|
|
Version: %{version} |
7 |
joequant |
484288 |
Release: %mkrel 1 |
8 |
joequant |
329022 |
Group: Development/Python |
9 |
|
|
Summary: pip installs packages. Python packages. An easy_install replacement |
10 |
|
|
|
11 |
|
|
License: MIT |
12 |
neoclust |
392884 |
URL: http://pypi.python.org/pypi/pip |
13 |
joequant |
329022 |
Source0: http://pypi.python.org/packages/source/p/pip/pip-%{version}.tar.gz |
14 |
neoclust |
412711 |
|
15 |
joequant |
329022 |
BuildArch: noarch |
16 |
|
|
|
17 |
philippem |
458721 |
BuildRequires: pkgconfig(python) |
18 |
neoclust |
392901 |
BuildRequires: python-setuptools |
19 |
joequant |
329022 |
|
20 |
neoclust |
401418 |
Requires: python-setuptools |
21 |
|
|
Requires: python-pkg-resources |
22 |
|
|
|
23 |
joequant |
329022 |
%description |
24 |
|
|
`pip` is a tool for installing and managing Python packages, such as |
25 |
|
|
those found in the `Python Package Index`_. It's a replacement for |
26 |
|
|
easy_install_. |
27 |
|
|
|
28 |
philippem |
458721 |
%package -n python3-pip |
29 |
|
|
Summary: A tool for installing and managing Python3 packages |
30 |
|
|
Group: Development/Python |
31 |
|
|
|
32 |
|
|
BuildRequires: pkgconfig(python3) |
33 |
|
|
BuildRequires: python3-setuptools |
34 |
|
|
Requires: python3-setuptools |
35 |
|
|
|
36 |
|
|
%description -n python3-pip |
37 |
|
|
Pip is a replacement for `easy_install |
38 |
|
|
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the |
39 |
|
|
same techniques for finding packages, so packages that were made |
40 |
|
|
easy_installable should be pip-installable as well. |
41 |
|
|
|
42 |
joequant |
329022 |
%prep |
43 |
|
|
%setup -q -n %{pypi_name}-%{version} |
44 |
|
|
# Remove bundled egg-info |
45 |
|
|
rm -rf %{pypi_name}.egg-info |
46 |
|
|
|
47 |
neoclust |
412711 |
%apply_patches |
48 |
philippem |
458721 |
%{__sed} -i '1d' pip/__init__.py |
49 |
joequant |
329022 |
|
50 |
philippem |
458721 |
cp -a . %{py3dir} |
51 |
|
|
|
52 |
joequant |
329022 |
%build |
53 |
|
|
%{__python} setup.py build |
54 |
philippem |
458721 |
pushd %{py3dir} |
55 |
|
|
%{__python3} setup.py build |
56 |
|
|
popd |
57 |
joequant |
329022 |
|
58 |
|
|
%install |
59 |
philippem |
458721 |
pushd %{py3dir} |
60 |
|
|
%{__python3} setup.py install --skip-build --root %{buildroot} |
61 |
joequant |
329022 |
|
62 |
philippem |
458721 |
# Change the name of the python3 pip executable in order to not conflict with |
63 |
|
|
# the python2 executable |
64 |
|
|
mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/python3-pip |
65 |
joequant |
329022 |
|
66 |
philippem |
458721 |
# The install process creates both pip and pip-<python_abiversion> that seem to |
67 |
|
|
# be the same. Remove the extra script |
68 |
|
|
pushd %{buildroot}%{_bindir} |
69 |
|
|
%{__rm} -rf pip-3* |
70 |
|
|
|
71 |
|
|
popd |
72 |
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot} |
73 |
|
|
|
74 |
|
|
# The install process creates both pip and pip-<python_abiversion> that seem to |
75 |
|
|
# be the same. Since removing pip-* also clobbers pip-python3, just remove pip-2* |
76 |
|
|
pushd %{buildroot}%{_bindir} |
77 |
|
|
%{__rm} -rf pip-2* |
78 |
|
|
|
79 |
|
|
|
80 |
joequant |
329022 |
%files |
81 |
philippem |
458721 |
%doc LICENSE.txt PKG-INFO docs |
82 |
|
|
%attr(755,root,root) %{_bindir}/pip |
83 |
|
|
%{python_sitelib}/pip* |
84 |
|
|
|
85 |
|
|
%files -n python3-pip |
86 |
|
|
%doc LICENSE.txt PKG-INFO docs |
87 |
|
|
%attr(755,root,root) %{_bindir}/python3-pip |
88 |
|
|
%{python3_sitelib}/pip* |
89 |
|
|
|