Blob Blame Raw
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}

%global modname cliff

Name:             python-%{modname}
Version:          2.14.0
Release:          1%{?dist}
Summary:          Command Line Interface Formulation Framework

License:          ASL 2.0
URL:              https://pypi.io/pypi/cliff
Source0:          %pypi_source cliff

BuildArch:        noarch


%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 python3-cliff
Summary:        Command Line Interface Formulation Framework
%{?python_provide:%python_provide python3-%{modname}}

BuildRequires:    python3-devel
BuildRequires:    python3-setuptools
BuildRequires:    python3-pbr
BuildRequires:    python3-prettytable
BuildRequires:    python3-cmd2 >= 0.6.7
BuildRequires:    python3-stevedore
BuildRequires:    python3-six
BuildRequires:    python3-PyYAML
BuildRequires:    python3-testtools

Requires:         python3-prettytable
Requires:         python3-cmd2 >= 0.6.7
Requires:         python3-stevedore >= 1.20.0
Requires:         python3-six
Requires:         python3-PyYAML

%description -n python3-cliff
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 python3-%{modname}-tests
Summary:          Command Line Interface Formulation Framework
%{?python_provide:%python_provide python3-%{modname}-tests}

# Required for the test suite
BuildRequires:    python3-mock
BuildRequires:    bash
BuildRequires:    python3-unicodecsv
BuildRequires:    python3-PyYAML
BuildRequires:    which
BuildRequires:    python3-docutils
BuildRequires:    python3-subunit
BuildRequires:    python3-testrepository
BuildRequires:    python3-testscenarios
BuildRequires:    python3-testtools

Requires:         python3-%{modname} = %{version}-%{release}
Requires:         bash
Requires:         python3-unicodecsv
Requires:         python3-PyYAML
Requires:         which
Requires:         python3-subunit
Requires:         python3-testrepository
Requires:         python3-testscenarios
Requires:         python3-testtools

%description -n python3-%{modname}-tests
This package contains tests for the python cliff library.

%prep
%setup -q -n %{modname}-%{upstream_version}
rm -rf {test-,}requirements.txt

# Remove bundled egg info
rm -rf *.egg-info

%build
%py3_build

%install
%py3_install

%check
# FIXME(hguemar): required as unversioned python binary has been moved
# to a separate package in F29+
# Will be useless when cliff switches to stestr as its tests runner
export PYTHON=python3
%{__python3} setup.py test

%files -n python3-%{modname}
%license LICENSE
%doc doc/ README.rst ChangeLog AUTHORS CONTRIBUTING.rst
%{python3_sitelib}/%{modname}
%{python3_sitelib}/%{modname}-*.egg-info
%exclude %{python3_sitelib}/%{modname}/tests

%files -n python3-%{modname}-tests
%{python3_sitelib}/%{modname}/tests

%changelog
* Fri Feb 15 2019 Alan Pevec <alan.pevec@redhat.com> 2.14.0-1
- Update to 2.14.0
- drop python2 sub-package

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Wed Jul 25 2018 Haïkel Guémar <hguemar@fedoraproject.org> - 2.13.0-2
- Modernize spec files
- Fix FTBFS (RHBZ#1605632)

* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 2.13.0
- Update to 2.13.0

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.9.1-4
- Rebuilt for Python 3.7

* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.9.1-3
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sun Oct 22 2017 Kevin Fenzi <kevin@scrye.com> - 2.9.1-1
- Update to 2.9.1. Fixes bug #1448974

* 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