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