diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a451fb2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/cornice_sphinx-0.3.tar.gz diff --git a/0000-Don-t-install-the-tests.patch b/0000-Don-t-install-the-tests.patch new file mode 100644 index 0000000..4853d62 --- /dev/null +++ b/0000-Don-t-install-the-tests.patch @@ -0,0 +1,26 @@ +From 13df77a3c1118782f7ef0316eca19e16a1e1c091 Mon Sep 17 00:00:00 2001 +From: Randy Barlow +Date: Wed, 20 Dec 2017 13:20:21 -0500 +Subject: [PATCH] Don't install the tests. + +Signed-off-by: Randy Barlow +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index d4b35b2..449fc06 100755 +--- a/setup.py ++++ b/setup.py +@@ -28,7 +28,7 @@ setup(name='cornice_sphinx', + author='Mozilla Services and contributors', + author_email='services-dev@mozilla.org', + url='https://github.com/Cornices/cornice.ext.sphinx', +- packages=find_packages(), ++ packages=find_packages(exclude=('tests', 'tests.*')), + include_package_data=True, + zip_safe=False, + install_requires=requires, +-- +2.9.5 + diff --git a/python-cornice-sphinx.spec b/python-cornice-sphinx.spec new file mode 100644 index 0000000..aad7346 --- /dev/null +++ b/python-cornice-sphinx.spec @@ -0,0 +1,96 @@ +%global module cornice_sphinx +%global desc Automatically generates Sphinx documentation for Cornice web services. + +Name: python-cornice-sphinx +Version: 0.3 +Release: 1%{?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: python2-cornice >= 3.0.0 +BuildRequires: python2-devel +BuildRequires: python2-docutils +BuildRequires: python2-nose +BuildRequires: python2-setuptools +BuildRequires: python2-sphinx +BuildRequires: python3-cornice >= 3.0.0 +BuildRequires: python3-devel +BuildRequires: python3-docutils +BuildRequires: python3-nose +BuildRequires: python3-setuptools +BuildRequires: python3-sphinx + + +%description +%{desc} + + +%package -n python2-cornice-sphinx +Summary: %{summary} + +Requires: python2-cornice >= 3.0.0 +Requires: python2-docutils +Requires: python2-sphinx + +%{?python_provide:%python_provide python2-cornice-sphinx} + + +%description -n python2-cornice-sphinx +%{desc} + + +%package -n python3-cornice-sphinx +Summary: %{summary} + +Requires: python3-cornice >= 3.0.0 +Requires: python3-docutils +Requires: python3-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 +* Wed Dec 20 2017 Randy Barlow - 0.3-1 +- Initial release (#1528008). diff --git a/sources b/sources new file mode 100644 index 0000000..d91c95d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cornice_sphinx-0.3.tar.gz) = 62fdff8eadded0516f7fd313470dcc8751233f5356d2e924b94f728f24e2658c77ff3673166259d7aa95f62b1e72c79c88f252d92eaa12a63ce61f3ca9c599e8