a229517
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
85cffe3
%if 0%{?fedora}
2dfce2a
%global with_python3 1
aa03494
%endif
aa03494
aa03494
%global modname cliff
aa03494
a229517
Name:             python-%{modname}
048d0c2
Version:          2.9.1
2ce962a
Release:          2%{?dist}
aa03494
Summary:          Command Line Interface Formulation Framework
aa03494
aa03494
Group:            Development/Libraries
aa03494
License:          ASL 2.0
a229517
URL:              https://pypi.io/pypi/cliff
a229517
Source0:          https://pypi.io/packages/source/c/cliff/cliff-%{version}.tar.gz
aa03494
aa03494
BuildArch:        noarch
aa03494
aa03494
BuildRequires:    python2-devel
aa03494
BuildRequires:    python-setuptools
2256126
BuildRequires:    python-pbr
aa03494
BuildRequires:    python-prettytable
2dfce2a
BuildRequires:    python-cmd2 >= 0.6.7
2256126
BuildRequires:    python-stevedore
a229517
BuildRequires:    python-six
2256126
d7334c1
d7334c1
%description
d7334c1
cliff is a framework for building command line programs. It uses setuptools
d7334c1
entry points to provide subcommands, output formatters, and other
d7334c1
extensions.
d7334c1
d7334c1
Documentation for cliff is hosted on readthedocs.org at
d7334c1
http://readthedocs.org/docs/cliff/en/latest/
d7334c1
d7334c1
d7334c1
%package -n python2-%{modname}
d7334c1
Summary:          Command Line Interface Formulation Framework
d7334c1
%{?python_provide:%python_provide python2-%{modname}}
d7334c1
aa03494
Requires:         python-prettytable
2dfce2a
Requires:         python-cmd2 >= 0.6.7
a229517
Requires:         python-stevedore >= 1.20.0
a229517
Requires:         python-six
Alan Pevec 5dfdec2
Requires:         python-unicodecsv
Alan Pevec 5dfdec2
Requires:         PyYAML
aa03494
56e6476
%if %{?rhel}%{!?rhel:0} == 6
701ed14
BuildRequires:    python-argparse
701ed14
Requires:         python-argparse
701ed14
%endif
701ed14
d7334c1
%description -n python2-%{modname}
aa03494
cliff is a framework for building command line programs. It uses setuptools
aa03494
entry points to provide subcommands, output formatters, and other
aa03494
extensions.
aa03494
aa03494
Documentation for cliff is hosted on readthedocs.org at
aa03494
http://readthedocs.org/docs/cliff/en/latest/
aa03494
d7334c1
%package -n python2-%{modname}-tests
a229517
Summary:          Command Line Interface Formulation Framework
d7334c1
%{?python_provide:%python_provide python2-%{modname}-tests}
d7334c1
a229517
# Required for the test suite
a229517
BuildRequires:    python-mock
a229517
BuildRequires:    bash
a229517
BuildRequires:    python-unicodecsv
a229517
BuildRequires:    PyYAML
a229517
BuildRequires:    which
a229517
BuildRequires:    python-docutils
a229517
BuildRequires:    python-subunit
a229517
BuildRequires:    python-testrepository
a229517
BuildRequires:    python-testscenarios
a229517
BuildRequires:    python-testtools
a229517
a229517
Requires:         python-%{modname} = %{version}-%{release}
a229517
Requires:         python-mock
a229517
Requires:         bash
a229517
Requires:         python-unicodecsv
a229517
Requires:         PyYAML
a229517
Requires:         which
a229517
Requires:         python-subunit
a229517
Requires:         python-testrepository
a229517
Requires:         python-testscenarios
a229517
Requires:         python-testtools
a229517
d7334c1
%description -n python2-%{modname}-tests
a229517
This package contains tests for the python cliff library.
a229517
aa03494
%if 0%{?with_python3}
aa03494
%package -n python3-cliff
aa03494
Summary:        Command Line Interface Formulation Framework
aa03494
Group:          Development/Libraries
d7334c1
%{?python_provide:%python_provide python3-%{modname}}
aa03494
a229517
BuildRequires:    python3-devel
a229517
BuildRequires:    python3-setuptools
a229517
BuildRequires:    python3-pbr
a229517
BuildRequires:    python3-prettytable
a229517
BuildRequires:    python3-cmd2 >= 0.6.7
a229517
BuildRequires:    python3-stevedore
a229517
BuildRequires:    python3-six
a229517
BuildRequires:    python3-PyYAML
a229517
BuildRequires:    python3-testtools
a229517
d3eae25
Requires:         python3-prettytable
2dfce2a
Requires:         python3-cmd2 >= 0.6.7
a229517
Requires:         python3-stevedore >= 1.20.0
2256126
Requires:         python3-six
Alan Pevec f20e2da
Requires:         python3-PyYAML
85cffe3
aa03494
%description -n python3-cliff
aa03494
cliff is a framework for building command line programs. It uses setuptools
aa03494
entry points to provide subcommands, output formatters, and other
aa03494
extensions.
aa03494
aa03494
Documentation for cliff is hosted on readthedocs.org at
aa03494
http://readthedocs.org/docs/cliff/en/latest/
a229517
a229517
%package -n python3-%{modname}-tests
a229517
Summary:          Command Line Interface Formulation Framework
d7334c1
%{?python_provide:%python_provide python3-%{modname}-tests}
d7334c1
a229517
# Required for the test suite
a229517
BuildRequires:    bash
a229517
BuildRequires:    python3-unicodecsv
a229517
BuildRequires:    python3-PyYAML
a229517
BuildRequires:    which
a229517
BuildRequires:    python3-subunit
a229517
BuildRequires:    python3-testrepository
a229517
BuildRequires:    python3-testscenarios
a229517
BuildRequires:    python3-testtools
a229517
a229517
Requires:         python3-%{modname} = %{version}-%{release}
a229517
Requires:         bash
a229517
Requires:         python3-unicodecsv
a229517
Requires:         python3-PyYAML
a229517
Requires:         which
a229517
Requires:         python3-subunit
a229517
Requires:         python3-testrepository
a229517
Requires:         python3-testscenarios
a229517
Requires:         python3-testtools
a229517
a229517
%description -n python3-%{modname}-tests
a229517
This package contains tests for the python cliff library.
aa03494
%endif
aa03494
aa03494
%prep
a229517
%setup -q -n %{modname}-%{upstream_version}
a229517
rm -rf {test-,}requirements.txt
aa03494
a229517
# Remove bundled egg info
a229517
rm -rf *.egg-info
2256126
aa03494
%if 0%{?with_python3}
aa03494
rm -rf %{py3dir}
aa03494
cp -a . %{py3dir}
aa03494
%endif
aa03494
aa03494
%build
a229517
%{__python2} setup.py build
aa03494
aa03494
%if 0%{?with_python3}
aa03494
pushd %{py3dir}
aa03494
%{__python3} setup.py build
aa03494
popd
aa03494
%endif
aa03494
aa03494
%install
aa03494
%if 0%{?with_python3}
aa03494
pushd %{py3dir}
aa03494
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
aa03494
popd
aa03494
%endif
aa03494
a229517
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
aa03494
aa03494
%check
aa03494
%if 0%{?with_python3}
a229517
%{__python3} setup.py test
a229517
rm -rf .testrepository
aa03494
%endif
a229517
%{__python2} setup.py test
aa03494
d7334c1
%files -n python2-%{modname}
b92f323
%license LICENSE
26e4595
%doc doc/ README.rst ChangeLog AUTHORS CONTRIBUTING.rst
a229517
%{python2_sitelib}/%{modname}
a229517
%{python2_sitelib}/%{modname}-*.egg-info
a229517
%exclude %{python2_sitelib}/%{modname}/tests
a229517
d7334c1
%files -n python2-%{modname}-tests
a229517
%{python2_sitelib}/%{modname}/tests
aa03494
aa03494
%if 0%{?with_python3}
aa03494
%files -n python3-%{modname}
b92f323
%license LICENSE
26e4595
%doc doc/ README.rst ChangeLog AUTHORS CONTRIBUTING.rst
aa03494
%{python3_sitelib}/%{modname}
Alan Pevec 5dfdec2
%{python3_sitelib}/%{modname}-*.egg-info
a229517
%exclude %{python3_sitelib}/%{modname}/tests
a229517
a229517
%files -n python3-%{modname}-tests
a229517
%{python3_sitelib}/%{modname}/tests
aa03494
%endif
aa03494
aa03494
%changelog
2ce962a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
2ce962a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2ce962a
048d0c2
* Sun Oct 22 2017 Kevin Fenzi <kevin@scrye.com> - 2.9.1-1
048d0c2
- Update to 2.9.1. Fixes bug #1448974
048d0c2
d7334c1
* Mon Oct 16 2017 Petr Viktorin <pviktori@redhat.com> 3.8.0-2
d7334c1
- Use explicit Python version in "python2-cliff" package name
d7334c1
a229517
* Thu Aug 10 2017 Alfredo Moralejo <amoralej@redhat.com> 2.8.0-1
a229517
- Update to 2.8.0
aa03494