diff --git a/patsy-ipython-doc.patch b/patsy-ipython-doc.patch new file mode 100644 index 0000000..dff6991 --- /dev/null +++ b/patsy-ipython-doc.patch @@ -0,0 +1,13 @@ +diff -ur patsy-0.2.1/doc/conf.py patsy-0.2.1.doc/doc/conf.py +--- patsy-0.2.1/doc/conf.py 2014-06-17 00:33:42.062390010 +0200 ++++ patsy-0.2.1.doc/doc/conf.py 2014-06-17 00:35:39.727331116 +0200 +@@ -60,7 +60,8 @@ + # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.pngmath', + 'sphinx.ext.intersphinx', +- 'ipython_directive', 'ipython_console_highlighting', ++ 'IPython.sphinxext.ipython_directive', ++ 'IPython.sphinxext.ipython_console_highlighting' + ] + + # Add any paths that contain templates here, relative to this directory. diff --git a/python-patsy.spec b/python-patsy.spec index fec339a..2b26387 100644 --- a/python-patsy.spec +++ b/python-patsy.spec @@ -3,7 +3,7 @@ %global with_python3 1 Name: python-%{upname} Version: 0.2.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Describing statistical models in Python using symbolic formulas Group: Development/Languages @@ -15,16 +15,23 @@ URL: https://github.com/pydata/patsy Source0: https://pypi.python.org/packages/source/p/patsy/patsy-%{version}.tar.gz # Disable test if pandas not present Patch0: patsy-nopandas.patch +# Fix for IPython 2.x +# https://github.com/pydata/patsy/commit/5a94297e46a02b8940f520d92e777bdbf6b42822 +Patch1: patsy-ipython-doc.patch BuildArch: noarch BuildRequires: python2-devel python-nose # For the docs -BuildRequires: python-sphinx python-matplotlib python-ipython-console +BuildRequires: python-sphinx +%if 0%{?fedora} >= 21 +BuildRequires: python-ipython-sphinx +%endif BuildRequires: numpy # For splines BuildRequires: scipy BuildRequires: python-pandas + Requires: numpy scipy python-pandas %description @@ -42,13 +49,16 @@ This package contains the full API documentation for %{name}. %if 0%{?with_python3} %package -n python3-%{upname} Summary: Describing statistical models in Python using symbolic formulas -BuildRequires: python3-devel python3-nose +BuildRequires: python3-devel +BuildRequires: python3-numpy python3-scipy python3-pandas +BuildRequires: python3-nose + # For the docs -BuildRequires: python3-sphinx python3-matplotlib python3-ipython-console -BuildRequires: python3-numpy -# For splines -BuildRequires: python3-scipy -BuildRequires: python3-pandas +BuildRequires: python3-sphinx +%if 0%{?fedora} >= 21 +BuildRequires: python3-ipython-sphinx +%endif + Requires: python3-numpy python3-scipy python3-pandas %description -n python3-%{upname} @@ -68,6 +78,9 @@ This package contains the full API documentation for %{name}. %prep %setup -q -n %{upname}-%{version} %patch0 -p1 +%if 0%{?fedora} >= 21 +%patch1 -p1 +%endif %if 0%{?with_python3} rm -rf %{py3dir} @@ -80,8 +93,8 @@ find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' %build %{__python2} setup.py build # Doc creation broken due to new ipython -#%{__python2} setup.py build_sphinx -#rm -f build/sphinx/html/.buildinfo +%{__python2} setup.py build_sphinx +rm -f build/sphinx/html/.buildinfo %if 0%{?with_python3} pushd %{py3dir} @@ -115,8 +128,7 @@ popd %{python2_sitelib}/patsy* %files doc -#doc LICENSE.txt README TODO build/sphinx/html -%doc LICENSE.txt README TODO +%doc LICENSE.txt README TODO build/sphinx/html %if 0%{?with_python3} %files -n python3-%{upname} @@ -124,11 +136,13 @@ popd %{python3_sitelib}/patsy* %files -n python3-%{upname}-doc -#doc LICENSE.txt README TODO build/sphinx/html -%doc LICENSE.txt README TODO +%doc LICENSE.txt README TODO build/sphinx/html %endif # with_python3 %changelog +* Tue Jun 17 2014 Sergio Pascual - 0.2.1-6 +- Doc generation enabled, patch from upstream + * Sat Jun 07 2014 Fedora Release Engineering - 0.2.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild