Blob Blame History Raw
%global module cornice_sphinx
%global desc Automatically generates Sphinx documentation for Cornice web services.

Name:             python-cornice-sphinx
Version:          0.3
Release:          2%{?dist}
BuildArch:        noarch

License:          ASL 2.0 and MPLv2.0
Summary:          Cornice extension to generate Sphinx docs
URL:              https://github.com/Cornices/cornice.ext.sphinx
Source0:          %{url}/archive/%{version}/%{module}-%{version}.tar.gz
# https://github.com/Cornices/cornice.ext.sphinx/pull/14
Patch0:           0000-Don-t-install-the-tests.patch


BuildRequires: %{py2_dist cornice} >= 3.0.0
BuildRequires: %{py2_dist docutils nose setuptools sphinx}
BuildRequires: %{py3_dist cornice} >= 3.0.0
BuildRequires: %{py3_dist docutils nose setuptools sphinx}
BuildRequires: python2-devel
BuildRequires: python3-devel


%description
%{desc}


%package -n python2-cornice-sphinx
Summary:          %{summary}

Requires: %{py2_dist cornice} >= 3.0.0
Requires: %{py2_dist docutils sphinx}

%{?python_provide:%python_provide python2-cornice-sphinx}


%description -n python2-cornice-sphinx
%{desc}


%package -n python3-cornice-sphinx
Summary:          %{summary}

Requires: %{py3_dist cornice} >= 3.0.0
Requires: %{py3_dist docutils sphinx}

%{?python_provide:%python_provide python3-cornice-sphinx}


%description -n python3-cornice-sphinx
%{desc}


%prep
%autosetup -p1 -n cornice.ext.sphinx-%{version}


%build
%py2_build
%py3_build


%install
%py2_install
%py3_install


%check
PYTHONPATH="." nosetests-2
PYTHONPATH="." nosetests-3


%files -n python2-cornice-sphinx
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{module}*


%files -n python3-cornice-sphinx
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{module}*


%changelog
* Thu Dec 21 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.3-2
- Use fancy new py2_dist and py3_dist macros.

* Wed Dec 20 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.3-1
- Initial release (#1528008).