[11272] | 1 | %bcond_with bootstrap |
---|
[12469] | 2 | %bcond_without python2 |
---|
[11272] | 3 | %bcond_without python3 |
---|
| 4 | |
---|
[1752] | 5 | %global srcname pip |
---|
| 6 | |
---|
[11272] | 7 | %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl |
---|
| 8 | %if %{without bootstrap} |
---|
[12469] | 9 | %if %{with python2} |
---|
[11272] | 10 | %global python2_wheelname %python_wheelname |
---|
[12469] | 11 | %endif |
---|
[11272] | 12 | %if %{with python3} |
---|
| 13 | %global python3_wheelname %python_wheelname |
---|
| 14 | %endif |
---|
| 15 | %endif |
---|
| 16 | |
---|
[1752] | 17 | Summary: Pip installs Python packages. An easy_install replacement |
---|
| 18 | Summary(ja): Pip は easy_install を置き換える Python パッケージインストーラです。 |
---|
| 19 | Name: python-%{srcname} |
---|
[12545] | 20 | Version: 20.3.4 |
---|
[8863] | 21 | Release: 1%{?_dist_release} |
---|
[12469] | 22 | Group: programming |
---|
| 23 | Vendor: Project Vine |
---|
| 24 | Distribution: Vine Linux |
---|
[1752] | 25 | |
---|
| 26 | License: MIT |
---|
[11799] | 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 |
---|
[11272] | 32 | |
---|
[11799] | 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 |
---|
[1752] | 37 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 38 | |
---|
| 39 | BuildArch: noarch |
---|
[11272] | 40 | BuildRequires: python-rpm-macros |
---|
[12469] | 41 | |
---|
| 42 | %if %{with python2} |
---|
| 43 | BuildRequires: python2-rpm-macros |
---|
[1752] | 44 | BuildRequires: python-devel |
---|
| 45 | BuildRequires: python-setuptools |
---|
[11272] | 46 | %if %{without bootstrap} |
---|
| 47 | BuildRequires: python-pip |
---|
| 48 | BuildRequires: python-wheel |
---|
| 49 | %endif |
---|
[12469] | 50 | Requires: python-setuptools |
---|
| 51 | Requires(post,postun): alternatives |
---|
| 52 | %endif |
---|
[1752] | 53 | |
---|
[12469] | 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 |
---|
[8158] | 63 | |
---|
[1752] | 64 | %description |
---|
[11272] | 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". |
---|
[1752] | 69 | |
---|
| 70 | |
---|
[12469] | 71 | %if %{with python3} |
---|
| 72 | %package -n python3-%{srcname} |
---|
[11272] | 73 | Summary: A tool for installing and managing Python3 packages |
---|
[12469] | 74 | Group: programming |
---|
[11272] | 75 | Requires: python3-setuptools |
---|
[12469] | 76 | Requires(post,postun): alternatives |
---|
[1752] | 77 | |
---|
[11272] | 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". |
---|
[12469] | 83 | %endif |
---|
[11272] | 84 | |
---|
| 85 | |
---|
[1752] | 86 | %prep |
---|
| 87 | %setup -q -n %{srcname}-%{version} |
---|
| 88 | |
---|
[11272] | 89 | |
---|
[1752] | 90 | %build |
---|
[12469] | 91 | %if %{with python2} |
---|
[11272] | 92 | %if %{without bootstrap} |
---|
| 93 | %py_build_wheel |
---|
| 94 | %else |
---|
| 95 | %py_build |
---|
| 96 | %endif |
---|
[12469] | 97 | %endif |
---|
[1752] | 98 | |
---|
[11272] | 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 | |
---|
[1752] | 108 | %install |
---|
| 109 | %{__rm} -rf %{buildroot} |
---|
| 110 | |
---|
[11272] | 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 | |
---|
[12469] | 120 | %if %{with python2} |
---|
[11272] | 121 | %if %{without bootstrap} |
---|
[12469] | 122 | %py2_install_wheel %{python_wheelname} |
---|
[11272] | 123 | %else |
---|
| 124 | %py_install |
---|
| 125 | %endif |
---|
[12469] | 126 | rm %{buildroot}%{_bindir}/pip |
---|
| 127 | %endif # with python2 |
---|
[11272] | 128 | |
---|
| 129 | |
---|
[1752] | 130 | %clean |
---|
| 131 | %{__rm} -rf %{buildroot} |
---|
| 132 | |
---|
[12469] | 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} |
---|
[1752] | 172 | %files |
---|
| 173 | %defattr(-,root,root,-) |
---|
[11272] | 174 | %license LICENSE.txt |
---|
| 175 | %doc README.rst docs |
---|
[8863] | 176 | %attr(755,root,root) %{_bindir}/pip2* |
---|
[1752] | 177 | %{python_sitelib}/pip* |
---|
[12469] | 178 | %endif |
---|
[1752] | 179 | |
---|
[12469] | 180 | %if %{with python3} |
---|
[11272] | 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* |
---|
[12469] | 187 | %endif |
---|
[11272] | 188 | |
---|
[11799] | 189 | |
---|
[1752] | 190 | %changelog |
---|
[12545] | 191 | * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.3.4-1 |
---|
| 192 | - new upstream release. |
---|
| 193 | |
---|
[12469] | 194 | * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.2.2-1 |
---|
| 195 | - new upstream release. |
---|
| 196 | |
---|
[12367] | 197 | * Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.0.2-1 |
---|
| 198 | - new upstream release. |
---|
| 199 | |
---|
[11799] | 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 | |
---|
[11272] | 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 | |
---|
[8863] | 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 | |
---|
[8158] | 214 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-3 |
---|
| 215 | - rebuild with VineSeed environment |
---|
| 216 | |
---|
[5701] | 217 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-2 |
---|
| 218 | - rebuild with python-2.7.2 |
---|
| 219 | |
---|
[2228] | 220 | * Mon Nov 22 2010 Shu KONNO <owa@bg.wakwak.com> 0.8.1-1 |
---|
| 221 | - updated pip to 0.8.1 |
---|
| 222 | |
---|
[1752] | 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 |
---|
[8158] | 237 | * Fri Dec 18 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-2 |
---|
[1752] | 238 | - fix spec file |
---|
[8158] | 239 | * Thu Dec 17 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-1 |
---|
[1752] | 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 | |
---|