|
@@ -1,58 +1,145 @@
|
|
|
|
+%bcond_with bootstrap
|
|
|
|
+%bcond_without python3
|
|
|
|
+
|
|
%global srcname pip
|
|
%global srcname pip
|
|
|
|
|
|
|
|
+%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
|
|
|
|
+%if %{without bootstrap}
|
|
|
|
+%global python2_wheelname %python_wheelname
|
|
|
|
+%if %{with python3}
|
|
|
|
+%global python3_wheelname %python_wheelname
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
|
|
+
|
|
Summary: Pip installs Python packages. An easy_install replacement
|
|
Summary: Pip installs Python packages. An easy_install replacement
|
|
Summary(ja): Pip は easy_install を置き換える Python パッケージインストーラです。
|
|
Summary(ja): Pip は easy_install を置き換える Python パッケージインストーラです。
|
|
Name: python-%{srcname}
|
|
Name: python-%{srcname}
|
|
-Version: 1.5.6
|
|
+Version: 9.0.1
|
|
Release: 1%{?_dist_release}
|
|
Release: 1%{?_dist_release}
|
|
|
|
|
|
Group: Development/Libraries
|
|
Group: Development/Libraries
|
|
License: MIT
|
|
License: MIT
|
|
URL: http://pip.openplans.org
|
|
URL: http://pip.openplans.org
|
|
Source0: http://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz
|
|
Source0: http://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
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
|
|
BuildArch: noarch
|
|
BuildArch: noarch
|
|
|
|
+BuildRequires: python-rpm-macros
|
|
|
|
+BuildRequires: python3-rpm-macros
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: python-setuptools
|
|
|
|
+BuildRequires: python3-devel
|
|
|
|
+BuildRequires: python3-setuptools
|
|
Requires: python-setuptools
|
|
Requires: python-setuptools
|
|
|
|
+%if %{without bootstrap}
|
|
|
|
+BuildRequires: python-pip
|
|
|
|
+BuildRequires: python-wheel
|
|
|
|
+%endif
|
|
|
|
|
|
Vendor: Project Vine
|
|
Vendor: Project Vine
|
|
Distribution: Vine Linux
|
|
Distribution: Vine Linux
|
|
|
|
|
|
%description
|
|
%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".
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%package -n python3-%{srcname}
|
|
|
|
+Summary: A tool for installing and managing Python3 packages
|
|
|
|
+Group: Development/Libraries
|
|
|
|
+%if %{without bootstrap}
|
|
|
|
+BuildRequires: python3-pip
|
|
|
|
+BuildRequires: python3-wheel
|
|
|
|
+%endif
|
|
|
|
+Requires: python3-setuptools
|
|
|
|
|
|
-Pip is a replacement for `easy_install
|
|
+%description -n python3-%{srcname}
|
|
-<http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
|
|
+pip is a package management system used to install and manage software packages
|
|
-same techniques for finding packages, so packages that were made
|
|
+written in Python. Many packages can be found in the Python Package Index
|
|
-easy_installable should be pip-installable as well.
|
|
+(PyPI). pip is a recursive acronym that can stand for either "Pip Installs
|
|
|
|
+Packages" or "Pip Installs Python".
|
|
|
|
|
|
-pip is meant to improve on easy_install.bulletin boards, etc.).
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q -n %{srcname}-%{version}
|
|
%setup -q -n %{srcname}-%{version}
|
|
-%{__sed} -i '1d' pip/__init__.py
|
|
+%patch0 -p1
|
|
|
|
+%patch1 -p1
|
|
|
|
+
|
|
|
|
+# Remove ordereddict as it is only required for python <= 2.6
|
|
|
|
+#rm pip/_vendor/ordereddict.py
|
|
|
|
|
|
%build
|
|
%build
|
|
-%{__python} setup.py build
|
|
+%if %{without bootstrap}
|
|
|
|
+%py_build_wheel
|
|
|
|
+%else
|
|
|
|
+%py_build
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%if %{with python3}
|
|
|
|
+%if %{without bootstrap}
|
|
|
|
+%py3_build_wheel
|
|
|
|
+%else
|
|
|
|
+%py3_build
|
|
|
|
+%endif
|
|
|
|
+%endif # with python3
|
|
|
|
+
|
|
|
|
|
|
%install
|
|
%install
|
|
%{__rm} -rf %{buildroot}
|
|
%{__rm} -rf %{buildroot}
|
|
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
+
|
|
-%{__rm} -rf %{buildroot}%{_bindir}/pip-*
|
|
+%if %{with python3}
|
|
-#mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip-python
|
|
+%if %{without bootstrap}
|
|
|
|
+%py3_install_wheel %{python3_wheelname}
|
|
|
|
+%else
|
|
|
|
+%py3_install
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
|
|
|
|
+# (pip install wheel doesn't overwrite)
|
|
|
|
+rm %{buildroot}%{_bindir}/pip
|
|
|
|
+%endif # with python3
|
|
|
|
+
|
|
|
|
+%if %{without bootstrap}
|
|
|
|
+%py_install_wheel %{python_wheelname}
|
|
|
|
+%else
|
|
|
|
+%py_install
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
|
|
%clean
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc PKG-INFO docs
|
|
+%license LICENSE.txt
|
|
|
|
+%doc README.rst docs
|
|
%attr(755,root,root) %{_bindir}/pip
|
|
%attr(755,root,root) %{_bindir}/pip
|
|
%attr(755,root,root) %{_bindir}/pip2*
|
|
%attr(755,root,root) %{_bindir}/pip2*
|
|
%{python_sitelib}/pip*
|
|
%{python_sitelib}/pip*
|
|
|
|
|
|
|
|
+%files -n python3-pip
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%license LICENSE.txt
|
|
|
|
+%doc README.rst docs
|
|
|
|
+%attr(755,root,root) %{_bindir}/pip3*
|
|
|
|
+%{python3_sitelib}/pip*
|
|
|
|
+
|
|
%changelog
|
|
%changelog
|
|
|
|
+* 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
|
|
* Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.5.6-1
|
|
- new upstream release
|
|
- new upstream release
|
|
- didn't rename pip to python-pip
|
|
- didn't rename pip to python-pip
|