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