#1 Use explicit Python version in "python2-cliff" package name
Merged 2 years ago by kevin. Opened 2 years ago by pviktori.
rpms/ pviktori/python-cliff python2-cliff  into  master

file modified
+28 -6

@@ -7,7 +7,7 @@ 

  

  Name:             python-%{modname}

  Version:          2.8.0

- Release:          1%{?dist}

+ Release:          2%{?dist}

  Summary:          Command Line Interface Formulation Framework

  

  Group:            Development/Libraries

@@ -25,6 +25,20 @@ 

  BuildRequires:    python-stevedore

  BuildRequires:    python-six

  

+ 

+ %description

+ cliff is a framework for building command line programs. It uses setuptools

+ entry points to provide subcommands, output formatters, and other

+ extensions.

+ 

+ Documentation for cliff is hosted on readthedocs.org at

+ http://readthedocs.org/docs/cliff/en/latest/

+ 

+ 

+ %package -n python2-%{modname}

+ Summary:          Command Line Interface Formulation Framework

+ %{?python_provide:%python_provide python2-%{modname}}

+ 

  Requires:         python-prettytable

  Requires:         python-cmd2 >= 0.6.7

  Requires:         python-stevedore >= 1.20.0

@@ -37,7 +51,7 @@ 

  Requires:         python-argparse

  %endif

  

- %description

+ %description -n python2-%{modname}

  cliff is a framework for building command line programs. It uses setuptools

  entry points to provide subcommands, output formatters, and other

  extensions.

@@ -45,8 +59,10 @@ 

  Documentation for cliff is hosted on readthedocs.org at

  http://readthedocs.org/docs/cliff/en/latest/

  

- %package -n python-%{modname}-tests

+ %package -n python2-%{modname}-tests

  Summary:          Command Line Interface Formulation Framework

+ %{?python_provide:%python_provide python2-%{modname}-tests}

+ 

  # Required for the test suite

  BuildRequires:    python-mock

  BuildRequires:    bash

@@ -70,13 +86,14 @@ 

  Requires:         python-testscenarios

  Requires:         python-testtools

  

- %description -n python-%{modname}-tests

+ %description -n python2-%{modname}-tests

  This package contains tests for the python cliff library.

  

  %if 0%{?with_python3}

  %package -n python3-cliff

  Summary:        Command Line Interface Formulation Framework

  Group:          Development/Libraries

+ %{?python_provide:%python_provide python3-%{modname}}

  

  BuildRequires:    python3-devel

  BuildRequires:    python3-setuptools

@@ -104,6 +121,8 @@ 

  

  %package -n python3-%{modname}-tests

  Summary:          Command Line Interface Formulation Framework

+ %{?python_provide:%python_provide python3-%{modname}-tests}

+ 

  # Required for the test suite

  BuildRequires:    bash

  BuildRequires:    python3-unicodecsv

@@ -165,14 +184,14 @@ 

  %endif

  %{__python2} setup.py test

  

- %files

+ %files -n python2-%{modname}

  %license LICENSE

  %doc doc/ README.rst ChangeLog AUTHORS CONTRIBUTING.rst

  %{python2_sitelib}/%{modname}

  %{python2_sitelib}/%{modname}-*.egg-info

  %exclude %{python2_sitelib}/%{modname}/tests

  

- %files -n python-%{modname}-tests

+ %files -n python2-%{modname}-tests

  %{python2_sitelib}/%{modname}/tests

  

  %if 0%{?with_python3}

@@ -188,6 +207,9 @@ 

  %endif

  

  %changelog

+ * Mon Oct 16 2017 Petr Viktorin <pviktori@redhat.com> 3.8.0-2

+ - Use explicit Python version in "python2-cliff" package name

+ 

  * Thu Aug 10 2017 Alfredo Moralejo <amoralej@redhat.com> 2.8.0-1

  - Update to 2.8.0

  

To enable switching python to mean Python 3 in Fedora, libraries for Python 2 need to use the python2- prefix, not just python-.

This PR does that for python2-cliff.
Note that the %python_provide macro provides the old name (so Require: python-cliff continues to work), and it enables a proper upgrade path.

Looks good to me. Thanks for the PR.

Pull-Request has been merged by kevin

2 years ago
Metadata