Blob Blame Raw
%if 0%{?fedora}
%global with_python3 1
%endif
%global pypi_name cliff-tablib
Name:           python-%{pypi_name}
Version:        1.1
Release:        10%{?dist}
Summary:        Tablib formatters for python-cliff
License:        ASL 2.0
URL:            https://github.com/dreamhost/cliff-tablib
Source0:        https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-sphinx
%global _description\
cliff-tablib is a set of formatter extensions for producing JSON,\
YAML, and HTML output in programs created with the cliff framework.
%description %_description
%package -n python2-%{pypi_name}
Summary: %summary
Requires:       python-cliff
Requires:       python-tablib
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name} %_description
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary:        Tablib formatters for python3-cliff
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-sphinx
Requires:       python3-cliff
Requires:       python3-tablib
%description -n python3-%{pypi_name}
cliff-tablib is a set of formatter extensions for producing JSON,
YAML, and HTML output in programs created with the cliff framework.
%endif
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python2} setup.py build
# generate html docs 
sphinx-build docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
# generate html docs 
sphinx-build-3 docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
popd
%endif
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif
%files -n python2-%{pypi_name}
%doc html 
%{python2_sitelib}/clifftablib
%{python2_sitelib}/cliff_tablib-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc html 
%{python3_sitelib}/clifftablib
%{python3_sitelib}/cliff_tablib-%{version}-py?.?.egg-info
%endif
%changelog
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1-10
- Python 2 binary package renamed to python2-cliff-tablib
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1-7
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Aug 05 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 1.1-3
- Add missing requirements on python-tablib
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 08 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 1.1-1
- Initial package.