123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- %bcond_with bootstrap
- %bcond_without python2
- %bcond_without python3
- %global srcname pip
- %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
- %if %{without bootstrap}
- %if %{with python2}
- %global python2_wheelname %python_wheelname
- %endif
- %if %{with python3}
- %global python3_wheelname %python_wheelname
- %endif
- %endif
- Summary: Pip installs Python packages. An easy_install replacement
- Summary(ja): Pip は easy_install を置き換える Python パッケージインストーラです。
- Name: python-%{srcname}
- Version: 20.3.4
- Release: 1%{?_dist_release}
- Group: programming
- Vendor: Project Vine
- Distribution: Vine Linux
- License: MIT
- URL: https://pip.pypa.io/en/stable/
- Source0: https://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz
- # # Patch until the following issue gets implemented upstream:
- # # https://github.com/pypa/pip/issues/1351
- # Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch
- # # Downstream only patch
- # # Emit a warning to the user if pip install is run with root privileges
- # # Issue upstream: https://github.com/pypa/pip/issues/4288
- # Patch1: emit-a-warning-when-running-with-root-privileges.patch
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
- BuildArch: noarch
- BuildRequires: python-rpm-macros
- %if %{with python2}
- BuildRequires: python2-rpm-macros
- BuildRequires: python-devel
- BuildRequires: python-setuptools
- %if %{without bootstrap}
- BuildRequires: python-pip
- BuildRequires: python-wheel
- %endif
- Requires: python-setuptools
- Requires(post,postun): alternatives
- %endif
- %if %{with python3}
- BuildRequires: python3-rpm-macros
- BuildRequires: python3-devel
- BuildRequires: python3-setuptools
- %if %{without bootstrap}
- BuildRequires: python3-pip
- BuildRequires: python3-wheel
- %endif
- %endif
- %description
- pip is a package management system used to install and manage software packages
- written in Python. Many packages can be found in the Python Package Index
- (PyPI). pip is a recursive acronym that can stand for either "Pip Installs
- Packages" or "Pip Installs Python".
- %if %{with python3}
- %package -n python3-%{srcname}
- Summary: A tool for installing and managing Python3 packages
- Group: programming
- Requires: python3-setuptools
- Requires(post,postun): alternatives
- %description -n python3-%{srcname}
- pip is a package management system used to install and manage software packages
- written in Python. Many packages can be found in the Python Package Index
- (PyPI). pip is a recursive acronym that can stand for either "Pip Installs
- Packages" or "Pip Installs Python".
- %endif
- %prep
- %setup -q -n %{srcname}-%{version}
- %build
- %if %{with python2}
- %if %{without bootstrap}
- %py_build_wheel
- %else
- %py_build
- %endif
- %endif
- %if %{with python3}
- %if %{without bootstrap}
- %py3_build_wheel
- %else
- %py3_build
- %endif
- %endif # with python3
- %install
- %{__rm} -rf %{buildroot}
- %if %{with python3}
- %if %{without bootstrap}
- %py3_install_wheel %{python3_wheelname}
- %else
- %py3_install
- %endif
- rm %{buildroot}%{_bindir}/pip
- %endif # with python3
- %if %{with python2}
- %if %{without bootstrap}
- %py2_install_wheel %{python_wheelname}
- %else
- %py_install
- %endif
- rm %{buildroot}%{_bindir}/pip
- %endif # with python2
- %clean
- %{__rm} -rf %{buildroot}
- %if %{with python2}
- %pre
- if [ ! -L %{_bindir}/%{srcname} ]; then
- rm -f %{_bindir}/%{srcname}
- fi
- %post
- /sbin/update-alternatives \
- --install %{_bindir}/%{srcname} %{srcname} \
- %{_bindir}/%{srcname}%{python_version} %{python_version_nodots}
- %preun
- if [ "$1" = 0 ]; then
- /sbin/update-alternatives \
- --remove %{srcname} %{_bindir}/%{srcname}%{python_version}
- fi
- %endif
- %if %{with python3}
- %pre -n python3-%{srcname}
- if [ ! -L %{_bindir}/%{srcname} ]; then
- rm -f %{_bindir}/%{srcname}
- fi
- %post -n python3-%{srcname}
- /sbin/update-alternatives \
- --install %{_bindir}/%{srcname} %{srcname} \
- %{_bindir}/%{srcname}%{python3_version} %{python3_version_nodots}
- %preun -n python3-%{srcname}
- if [ "$1" = 0 ]; then
- /sbin/update-alternatives \
- --remove %{srcname} %{_bindir}/%{srcname}%{python3_version}
- fi
- %endif
- %if %{with python2}
- %files
- %defattr(-,root,root,-)
- %license LICENSE.txt
- %doc README.rst docs
- %attr(755,root,root) %{_bindir}/pip2*
- %{python_sitelib}/pip*
- %endif
- %if %{with python3}
- %files -n python3-pip
- %defattr(-,root,root,-)
- %license LICENSE.txt
- %doc README.rst docs
- %attr(755,root,root) %{_bindir}/pip3*
- %{python3_sitelib}/pip*
- %endif
- %changelog
- * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.3.4-1
- - new upstream release.
- * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.2.2-1
- - new upstream release.
- * Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.0.2-1
- - new upstream release.
- * Sat Oct 06 2018 Toshiaki Ara <ara_t@384.jp> 18.1-1
- - new upstream release.
- - drop Patches
- - change URL
- * Mon Dec 18 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
- - new upstream release.
- - made to use python{,3}-rpm-macros.
- - added a sub-package for python3.
- * Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.5.6-1
- - new upstream release
- - didn't rename pip to python-pip
- * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-3
- - rebuild with VineSeed environment
- * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-2
- - rebuild with python-2.7.2
- * Mon Nov 22 2010 Shu KONNO <owa@bg.wakwak.com> 0.8.1-1
- - updated pip to 0.8.1
- * Fri Sep 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8-1
- - initial build for Vine Linux
- * Mon Aug 30 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.8-1
- - update to 0.8 of pip
- * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-5
- - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
- * Wed Jul 7 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.2-1
- - update to 0.7.2 of pip
- * Sun May 23 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.1-1
- - update to 0.7.1 of pip
- * Fri Jan 1 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1.4
- - fix dependency issue
- * Fri Dec 18 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-2
- - fix spec file
- * Thu Dec 17 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-1
- - upgrade to 0.6.1 of pip
- * Mon Aug 31 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.4-1
- - Initial package
|