| 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 | |
|---|
| 17 | Summary: Pip installs Python packages. An easy_install replacement |
|---|
| 18 | Summary(ja): Pip は easy_install を置き換える Python パッケージインストーラです。 |
|---|
| 19 | Name: python-%{srcname} |
|---|
| 20 | Version: 20.2.2 |
|---|
| 21 | Release: 1%{?_dist_release} |
|---|
| 22 | Group: programming |
|---|
| 23 | Vendor: Project Vine |
|---|
| 24 | Distribution: Vine Linux |
|---|
| 25 | |
|---|
| 26 | License: MIT |
|---|
| 27 | URL: https://pip.pypa.io/en/stable/ |
|---|
| 28 | Source0: 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 |
|---|
| 37 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
|---|
| 38 | |
|---|
| 39 | BuildArch: noarch |
|---|
| 40 | BuildRequires: python-rpm-macros |
|---|
| 41 | |
|---|
| 42 | %if %{with python2} |
|---|
| 43 | BuildRequires: python2-rpm-macros |
|---|
| 44 | BuildRequires: python-devel |
|---|
| 45 | BuildRequires: python-setuptools |
|---|
| 46 | %if %{without bootstrap} |
|---|
| 47 | BuildRequires: python-pip |
|---|
| 48 | BuildRequires: python-wheel |
|---|
| 49 | %endif |
|---|
| 50 | Requires: python-setuptools |
|---|
| 51 | Requires(post,postun): alternatives |
|---|
| 52 | %endif |
|---|
| 53 | |
|---|
| 54 | %if %{with python3} |
|---|
| 55 | BuildRequires: python3-rpm-macros |
|---|
| 56 | BuildRequires: python3-devel |
|---|
| 57 | BuildRequires: python3-setuptools |
|---|
| 58 | %if %{without bootstrap} |
|---|
| 59 | BuildRequires: python3-pip |
|---|
| 60 | BuildRequires: python3-wheel |
|---|
| 61 | %endif |
|---|
| 62 | %endif |
|---|
| 63 | |
|---|
| 64 | %description |
|---|
| 65 | pip is a package management system used to install and manage software packages |
|---|
| 66 | written 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 |
|---|
| 68 | Packages" or "Pip Installs Python". |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | %if %{with python3} |
|---|
| 72 | %package -n python3-%{srcname} |
|---|
| 73 | Summary: A tool for installing and managing Python3 packages |
|---|
| 74 | Group: programming |
|---|
| 75 | Requires: python3-setuptools |
|---|
| 76 | Requires(post,postun): alternatives |
|---|
| 77 | |
|---|
| 78 | %description -n python3-%{srcname} |
|---|
| 79 | pip is a package management system used to install and manage software packages |
|---|
| 80 | written 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 |
|---|
| 82 | Packages" 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 |
|---|
| 117 | rm %{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 |
|---|
| 126 | rm %{buildroot}%{_bindir}/pip |
|---|
| 127 | %endif # with python2 |
|---|
| 128 | |
|---|
| 129 | |
|---|
| 130 | %clean |
|---|
| 131 | %{__rm} -rf %{buildroot} |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | %if %{with python2} |
|---|
| 135 | %pre |
|---|
| 136 | if [ ! -L %{_bindir}/%{srcname} ]; then |
|---|
| 137 | rm -f %{_bindir}/%{srcname} |
|---|
| 138 | fi |
|---|
| 139 | |
|---|
| 140 | %post |
|---|
| 141 | /sbin/update-alternatives \ |
|---|
| 142 | --install %{_bindir}/%{srcname} %{srcname} \ |
|---|
| 143 | %{_bindir}/%{srcname}%{python_version} %{python_version_nodots} |
|---|
| 144 | |
|---|
| 145 | %preun |
|---|
| 146 | if [ "$1" = 0 ]; then |
|---|
| 147 | /sbin/update-alternatives \ |
|---|
| 148 | --remove %{srcname} %{_bindir}/%{srcname}%{python_version} |
|---|
| 149 | fi |
|---|
| 150 | %endif |
|---|
| 151 | |
|---|
| 152 | %if %{with python3} |
|---|
| 153 | %pre -n python3-%{srcname} |
|---|
| 154 | if [ ! -L %{_bindir}/%{srcname} ]; then |
|---|
| 155 | rm -f %{_bindir}/%{srcname} |
|---|
| 156 | fi |
|---|
| 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} |
|---|
| 164 | if [ "$1" = 0 ]; then |
|---|
| 165 | /sbin/update-alternatives \ |
|---|
| 166 | --remove %{srcname} %{_bindir}/%{srcname}%{python3_version} |
|---|
| 167 | fi |
|---|
| 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 | * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.2.2-1 |
|---|
| 192 | - new upstream release. |
|---|
| 193 | |
|---|
| 194 | * Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.0.2-1 |
|---|
| 195 | - new upstream release. |
|---|
| 196 | |
|---|
| 197 | * Sat Oct 06 2018 Toshiaki Ara <ara_t@384.jp> 18.1-1 |
|---|
| 198 | - new upstream release. |
|---|
| 199 | - drop Patches |
|---|
| 200 | - change URL |
|---|
| 201 | |
|---|
| 202 | * Mon Dec 18 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1 |
|---|
| 203 | - new upstream release. |
|---|
| 204 | - made to use python{,3}-rpm-macros. |
|---|
| 205 | - added a sub-package for python3. |
|---|
| 206 | |
|---|
| 207 | * Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.5.6-1 |
|---|
| 208 | - new upstream release |
|---|
| 209 | - didn't rename pip to python-pip |
|---|
| 210 | |
|---|
| 211 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-3 |
|---|
| 212 | - rebuild with VineSeed environment |
|---|
| 213 | |
|---|
| 214 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-2 |
|---|
| 215 | - rebuild with python-2.7.2 |
|---|
| 216 | |
|---|
| 217 | * Mon Nov 22 2010 Shu KONNO <owa@bg.wakwak.com> 0.8.1-1 |
|---|
| 218 | - updated pip to 0.8.1 |
|---|
| 219 | |
|---|
| 220 | * Fri Sep 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8-1 |
|---|
| 221 | - initial build for Vine Linux |
|---|
| 222 | |
|---|
| 223 | * Mon Aug 30 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.8-1 |
|---|
| 224 | - update to 0.8 of pip |
|---|
| 225 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-5 |
|---|
| 226 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
|---|
| 227 | |
|---|
| 228 | * Wed Jul 7 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.2-1 |
|---|
| 229 | - update to 0.7.2 of pip |
|---|
| 230 | * Sun May 23 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.1-1 |
|---|
| 231 | - update to 0.7.1 of pip |
|---|
| 232 | * Fri Jan 1 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1.4 |
|---|
| 233 | - fix dependency issue |
|---|
| 234 | * Fri Dec 18 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-2 |
|---|
| 235 | - fix spec file |
|---|
| 236 | * Thu Dec 17 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-1 |
|---|
| 237 | - upgrade to 0.6.1 of pip |
|---|
| 238 | * Mon Aug 31 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.4-1 |
|---|
| 239 | - Initial package |
|---|
| 240 | |
|---|