From 5d6139e0093bbfd8f5fc5a3267997cd5179270ef Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Tue, 28 Nov 2017 16:06:25 +0100 Subject: [PATCH] Implement the new Platform-Python proposal --- python-pip.spec | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 56edce1..d945664 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -3,6 +3,7 @@ %bcond_without python2 %bcond_without python3 +%bcond_with platform_python %global srcname pip %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl @@ -24,7 +25,7 @@ Name: python-%{srcname} Version: 9.0.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -115,7 +116,10 @@ BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel %endif Requires: python%{python3_pkgversion}-setuptools + +%if %{without platform_python} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +%endif %description -n python%{python3_pkgversion}-%{srcname} pip is a package management system used to install and manage software packages @@ -126,6 +130,22 @@ Packages" or "Pip Installs Python". %endif # with python3 +%if %{with platform_python} +%package -n python3-%{srcname} +Summary: A tool for installing and managing Python3 packages +Group: Development/Libraries +Requires: python%{python3_pkgversion}-%{srcname} = %{version} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} + +%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 # with platform_python + + %prep %setup -q -n %{srcname}-%{version} %if %{with tests} @@ -265,19 +285,29 @@ py.test-%{python3_version} -m 'not network' %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE.txt %doc README.rst docs -%{_bindir}/pip3 -%{_bindir}/pip-3 -%{_bindir}/pip%{python3_version} -%{_bindir}/pip-%{python3_version} %{python3_sitelib}/pip* %dir %{bashcompdir} %{bashcompdir}/pip3* %if 0%{?bashcomp2} %dir %(dirname %{bashcompdir}) %endif + +%if %{with platform_python} +%files -n python3-%{srcname} +%license LICENSE.txt +%doc README.rst docs +%endif # with platform_python + +%{_bindir}/pip3 +%{_bindir}/pip-3 +%{_bindir}/pip%{python3_version} +%{_bindir}/pip-%{python3_version} %endif # with python3 %changelog +* Tue Nov 28 2017 Tomas Orsava - 9.0.1-13 +- Implement the new Platform-Python proposal + * Tue Aug 29 2017 Tomas Orsava - 9.0.1-12 - Switch macros to bcond's and make Python 2 optional to facilitate building the Python 2 and Python 3 modules