/[packages]/cauldron/python-pip/current/SPECS/python-pip.spec
ViewVC logotype

Contents of /cauldron/python-pip/current/SPECS/python-pip.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 625292 - (show annotations) (download)
Sat May 24 08:36:23 2014 UTC (9 years, 10 months ago) by philippem
File size: 2832 byte(s)
Rebuild as wheel for Python 3.4
1 %define pypi_name pip
2 %define build_wheel 1
3
4 %if 0%{?build_wheel}
5 %define python2_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl
6 %define python3_wheelname %python2_wheelname
7 %endif
8
9 Name: python-pip
10 Version: 1.5.6
11 Release: %mkrel 2
12 Group: Development/Python
13 Summary: pip installs packages. Python packages. An easy_install replacement
14 License: MIT
15 URL: http://pypi.python.org/pypi/pip
16 Source0: http://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17 Patch0: pip-1.5.6-allow-stripping-prefix-from-wheel-RECORD-files.patch
18 BuildArch: noarch
19 BuildRequires: pkgconfig(python)
20 BuildRequires: python-setuptools
21 %if 0%{?build_wheel}
22 BuildRequires: python-pip
23 BuildRequires: python-wheel
24 %endif
25 Requires: python-setuptools
26 Requires: python-pkg-resources
27
28 %description
29 `pip` is a tool for installing and managing Python packages, such as
30 those found in the `Python Package Index`_. It's a replacement for
31 easy_install_.
32
33 %package -n python3-pip
34 Summary: A tool for installing and managing Python3 packages
35 Group: Development/Python
36 BuildRequires: pkgconfig(python3)
37 BuildRequires: python3-setuptools
38 %if 0%{?build_wheel}
39 BuildRequires: python3-pip
40 BuildRequires: python3-wheel
41 %endif
42 Requires: python3-setuptools
43
44 %description -n python3-pip
45 Pip is a replacement for `easy_install
46 <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
47 same techniques for finding packages, so packages that were made
48 easy_installable should be pip-installable as well.
49
50 %prep
51 %setup -q -n %{pypi_name}-%{version}
52 # Remove bundled egg-info
53 rm -rf %{pypi_name}.egg-info
54
55 %apply_patches
56 %{__sed} -i '1d' pip/__init__.py
57
58 cp -a . %{py3dir}
59
60 %build
61 %if 0%{?build_wheel}
62 %{__python} setup.py bdist_wheel
63 %else
64 %{__python} setup.py build
65 %endif
66
67 pushd %{py3dir}
68 %if 0%{?build_wheel}
69 %{__python3} setup.py bdist_wheel
70 %else
71 %{__python3} setup.py build
72 %endif
73 popd
74
75 %install
76 pushd %{py3dir}
77 %if 0%{?build_wheel}
78 pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
79 # TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
80 # (pip install wheel doesn't overwrite)
81 rm %{buildroot}%{_bindir}/pip
82 %else
83 %{__python3} setup.py install --skip-build --root %{buildroot}
84 %endif
85 popd
86
87 %if 0%{?build_wheel}
88 pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix %{buildroot}
89 %else
90 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
91 %endif
92
93
94 %files
95 %doc LICENSE.txt PKG-INFO docs
96 %attr(755,root,root) %{_bindir}/pip
97 %attr(755,root,root) %{_bindir}/pip2*
98 %{python_sitelib}/pip*
99
100 %files -n python3-pip
101 %doc LICENSE.txt PKG-INFO docs
102 %attr(755,root,root) %{_bindir}/pip3*
103 %{python3_sitelib}/pip*
104

  ViewVC Help
Powered by ViewVC 1.1.30