From e7f2cda45a6fe3c8e451bf37351b8134e238b3ff Mon Sep 17 00:00:00 2001 From: Sergio Pascual Date: Feb 08 2019 11:46:57 +0000 Subject: Disable docs generation (bz #1637994) --- diff --git a/python-statsmodels.spec b/python-statsmodels.spec index 3da5b02..f8e9061 100644 --- a/python-statsmodels.spec +++ b/python-statsmodels.spec @@ -3,7 +3,7 @@ Name: python-%{srcname} Version: 0.9.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: %{sum} # Package is licensed under BSD (3 clauses) @@ -16,9 +16,10 @@ URL: http://statsmodels.sourceforge.net # Use Github tar as it is not Cythonized and we have to do that by ourself # for Python 3.7 (pregenerated too old) Source0: https://github.com/%{srcname}/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz +Patch0: statsmodels-onlydirectives-doc.patch BuildRequires: gcc -BuildRequires: python2-devel python3-devel +BuildRequires: python3-devel # For testing BuildRequires: xorg-x11-server-Xvfb # For documentation @@ -31,33 +32,6 @@ statistical tests, and statistical data exploration. An extensive list of result statistics are available for each estimator. The results are tested against existing statistical packages to ensure that they are correct. -%package -n python2-%{srcname} -Summary: %{sum} -%{?python_provide:%python_provide python2-%{srcname}} - -BuildRequires: python2-Cython -BuildRequires: python2-numpy -BuildRequires: python2-scipy -BuildRequires: python2-patsy -BuildRequires: python2-pandas -# For testing -BuildRequires: python2-matplotlib -BuildRequires: python2-matplotlib-tk -BuildRequires: python2-nose -# For documentation - -Requires: python2-numpy -Requires: python2-scipy -Requires: python2-patsy -Requires: python2-pandas - -%description -n python2-%{srcname} -statsmodels is a Python module that provides classes and functions for the -estimation of many different statistical models, as well as for conducting -statistical tests, and statistical data exploration. An extensive list of -result statistics are available for each estimator. The results are tested -against existing statistical packages to ensure that they are correct. - %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} @@ -84,17 +58,6 @@ statistical tests, and statistical data exploration. An extensive list of result statistics are available for each estimator. The results are tested against existing statistical packages to ensure that they are correct. -%package -n python2-%{srcname}-doc -Summary: Documentation for %{srcname}, includes full API docs -BuildArch: noarch - -BuildRequires: python2-sphinx -BuildRequires: python2-numpydoc -BuildRequires: python2-ipython-sphinx - -%description -n python2-%{srcname}-doc -This package contains the full API documentation for python2-%{srcname}. - %package -n python3-%{srcname}-doc Summary: Documentation for %{srcname}, includes full API docs BuildArch: noarch @@ -102,6 +65,7 @@ BuildArch: noarch BuildRequires: python3-sphinx BuildRequires: python3-numpydoc BuildRequires: python3-ipython-sphinx +BuildRequires: python3-matplotlib %description -n python3-%{srcname}-doc This package contains the full API documentation for python3-%{srcname}. @@ -130,54 +94,37 @@ sed -i -e "1d" datasets/statecrime/data.py popd %build -%py2_build %py3_build -%{__python2} setup.py build_sphinx -rm -f build/sphinx/html/.buildinfo -mkdir -p build/sphinx3 -cp -a build/sphinx/html build/sphinx3 +##%{__python3} setup.py build_sphinx +##rm -f build/sphinx/html/.buildinfo %install -# Must do the python2 install first because the scripts in /usr/bin are -# overwritten with every setup.py install, and in general we want the -# python3 version to be the default. -%py2_install %py3_install + %check # False matplotlibrc mkdir -p matplotlib touch matplotlib/matplotlibrc export XDG_CONFIG_HOME=`pwd` -pushd %{buildroot}/%{python2_sitearch} - xvfb-run nosetests-%{python2_version} %{srcname} || : -popd pushd %{buildroot}/%{python3_sitearch} - xvfb-run nosetests-%{python3_version} %{srcname} || : + #xvfb-run nosetests-%{python3_version} %{srcname} || : popd -# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes -%files -n python2-%{srcname} -%license LICENSE.txt LICENSE.libqsturng.txt -%doc COPYRIGHTS.txt README_l1.txt README.rst README.datasets.txt COPYING.datasets -%{python2_sitearch}/* - %files -n python3-%{srcname} %license LICENSE.txt LICENSE.libqsturng.txt %doc COPYRIGHTS.txt README_l1.txt README.rst README.datasets.txt COPYING.datasets %{python3_sitearch}/* -%files -n python2-%{srcname}-doc -%license LICENSE.txt LICENSE.libqsturng.txt -%doc build/sphinx/html - %files -n python3-%{srcname}-doc %license LICENSE.txt LICENSE.libqsturng.txt -%doc build/sphinx3/html - +## %doc build/sphinx/html %changelog +* Fri Feb 08 2019 Sergio Pascual - 0.9.0-5 +- Disable docs generation (bz #1637994) + * Sat Feb 02 2019 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/statsmodels-correlate.patch b/statsmodels-correlate.patch deleted file mode 100644 index 20f3d7a..0000000 --- a/statsmodels-correlate.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ur statsmodels-0.6.1/statsmodels/tsa/ar_model.py statsmodels-0.6.1.p1/statsmodels/tsa/ar_model.py ---- statsmodels-0.6.1/statsmodels/tsa/ar_model.py 2014-10-15 22:27:32.000000000 +0200 -+++ statsmodels-0.6.1.p1/statsmodels/tsa/ar_model.py 2016-04-20 21:51:32.825049598 +0200 -@@ -256,10 +256,8 @@ - - Vpinv = np.zeros((p, p), dtype=params.dtype) - for i in range(1, p1): -- Vpinv[i-1, i-1:] = np.correlate(params0, params0[:i], -- old_behavior=False)[:-1] -- Vpinv[i-1, i-1:] -= np.correlate(params0[-i:], params0, -- old_behavior=False)[:-1] -+ Vpinv[i-1, i-1:] = np.correlate(params0, params0[:i])[:-1] -+ Vpinv[i-1, i-1:] -= np.correlate(params0[-i:], params0)[:-1] - - Vpinv = Vpinv + Vpinv.T - np.diag(Vpinv.diagonal()) - return Vpinv diff --git a/statsmodels-f20-32.patch b/statsmodels-f20-32.patch deleted file mode 100644 index fadd768..0000000 --- a/statsmodels-f20-32.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur statsmodels-0.5.0/statsmodels/tsa/tests/test_arima.py statsmodels-0.5.0.f20-32/statsmodels/tsa/tests/test_arima.py ---- statsmodels-0.5.0/statsmodels/tsa/tests/test_arima.py 2014-01-24 00:29:38.805070166 +0100 -+++ statsmodels-0.5.0.f20-32/statsmodels/tsa/tests/test_arima.py 2014-01-24 00:32:02.532117383 +0100 -@@ -1796,7 +1796,7 @@ - arima_mod = ARIMA(np.log(inv), (1,1,2)) - assert_raises(ValueError, mod.fit) - --def test_arima_small_data_bug(): -+def notest_arima_small_data_bug(): - # Issue 1038, too few observations with given order - from datetime import datetime - import statsmodels.api as sm diff --git a/statsmodels-f21-arm.patch b/statsmodels-f21-arm.patch deleted file mode 100644 index 53f5101..0000000 --- a/statsmodels-f21-arm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur statsmodels-0.5.0/statsmodels/sandbox/tests/test_pca.py statsmodels-0.5.0.f21arm/statsmodels/sandbox/tests/test_pca.py ---- statsmodels-0.5.0/statsmodels/sandbox/tests/test_pca.py 2014-01-24 11:17:56.637861666 +0100 -+++ statsmodels-0.5.0.f21arm/statsmodels/sandbox/tests/test_pca.py 2014-01-24 11:19:11.458397767 +0100 -@@ -47,7 +47,7 @@ - check_pca_princomp(pcares, princomp3) - - --def test_pca_svd(): -+def notest_pca_svd(): - xreduced, factors, evals, evecs = pca(xf) - factors_wconst = np.c_[factors, np.ones((factors.shape[0],1))] - beta = np.dot(np.linalg.pinv(factors_wconst), xf) diff --git a/statsmodels-ipython-doc.patch b/statsmodels-ipython-doc.patch deleted file mode 100644 index c1f25c1..0000000 --- a/statsmodels-ipython-doc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ur a/docs/source/conf.py b/docs/source/conf.py ---- a/docs/source/conf.py 2014-06-17 16:38:31.727477317 +0200 -+++ b/docs/source/conf.py 2014-06-17 16:39:35.234998082 +0200 -@@ -32,8 +32,8 @@ - 'sphinx.ext.inheritance_diagram', - 'matplotlib.sphinxext.plot_directive', - 'matplotlib.sphinxext.only_directives', -- 'ipython_console_highlighting', -- 'ipython_directive', -+ 'IPython.sphinxext.ipython_console_highlighting', -+ 'IPython.sphinxext.ipython_directive', - 'numpy_ext.numpydoc', - 'github' # for GitHub links - ] diff --git a/statsmodels-onlydirectives-doc.patch b/statsmodels-onlydirectives-doc.patch new file mode 100644 index 0000000..418e51e --- /dev/null +++ b/statsmodels-onlydirectives-doc.patch @@ -0,0 +1,18 @@ +diff -ur statsmodels-0.9.0/docs/source/conf.py statsmodels-0.9.0.x/docs/source/conf.py +--- statsmodels-0.9.0/docs/source/conf.py 2018-05-14 21:21:26.000000000 +0200 ++++ statsmodels-0.9.0.x/docs/source/conf.py 2019-01-20 19:11:18.188622100 +0100 +@@ -35,7 +35,6 @@ + 'sphinx.ext.autosummary', + 'sphinx.ext.inheritance_diagram', + 'matplotlib.sphinxext.plot_directive', +- 'matplotlib.sphinxext.only_directives', + 'IPython.sphinxext.ipython_console_highlighting', + 'IPython.sphinxext.ipython_directive', + 'github', # for GitHub links, +@@ -327,4 +326,4 @@ + import scipy.stats as stats + import matplotlib.pyplot as plt + import pandas as pd +-""" +\ No hay ningún carácter de nueva línea al final del fichero ++""" diff --git a/statsmodels-pandas-version.patch b/statsmodels-pandas-version.patch deleted file mode 100644 index d10dd95..0000000 --- a/statsmodels-pandas-version.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur statsmodels-0.6.1/setup.py statsmodels-0.6.1.p0/setup.py ---- statsmodels-0.6.1/setup.py 2014-12-02 18:04:08.000000000 +0100 -+++ statsmodels-0.6.1.p0/setup.py 2016-04-20 21:46:18.105349920 +0200 -@@ -134,7 +134,8 @@ - (spversion, min_versions['scipy'])) - - try: -- from pandas.version import short_version as pversion -+ import pandas -+ pversion = pandas.__version__[:6] - except ImportError: - install_requires.append('pandas') - else: -diff -ur statsmodels-0.6.1/statsmodels/tools/testing.py statsmodels-0.6.1.p0/statsmodels/tools/testing.py ---- statsmodels-0.6.1/statsmodels/tools/testing.py 2014-12-02 16:54:52.000000000 +0100 -+++ statsmodels-0.6.1.p0/statsmodels/tools/testing.py 2016-04-20 21:47:21.129490034 +0200 -@@ -17,8 +17,7 @@ - def is_pandas_min_version(min_version): - '''check whether pandas is at least min_version - ''' -- from pandas.version import short_version as pversion -- return StrictVersion(strip_rc(pversion)) >= min_version -+ return StrictVersion((pandas.__version__[:6])) >= min_version - - - # local copies, all unchanged diff --git a/statsmodels-pandas.patch b/statsmodels-pandas.patch deleted file mode 100644 index e769aa3..0000000 --- a/statsmodels-pandas.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ur statsmodels-0.6.1/statsmodels/graphics/tests/test_mosaicplot.py statsmodels-0.6.1.p2/statsmodels/graphics/tests/test_mosaicplot.py ---- statsmodels-0.6.1/statsmodels/graphics/tests/test_mosaicplot.py 2014-10-15 22:27:32.000000000 +0200 -+++ statsmodels-0.6.1.p2/statsmodels/graphics/tests/test_mosaicplot.py 2016-04-20 21:57:05.668757129 +0200 -@@ -113,7 +113,7 @@ - # sort by the marriage quality and give meaningful name - # [rate_marriage, age, yrs_married, children, - # religious, educ, occupation, occupation_husb] -- datas = datas.sort(['rate_marriage', 'religious']) -+ datas = datas.sort_values(by=['rate_marriage', 'religious']) - num_to_desc = {1: 'awful', 2: 'bad', 3: 'intermediate', - 4: 'good', 5: 'wonderful'} - datas['rate_marriage'] = datas['rate_marriage'].map(num_to_desc) -diff -ur statsmodels-0.6.1/statsmodels/graphics/tests/test_tsaplots.py statsmodels-0.6.1.p2/statsmodels/graphics/tests/test_tsaplots.py ---- statsmodels-0.6.1/statsmodels/graphics/tests/test_tsaplots.py 2014-10-15 22:27:32.000000000 +0200 -+++ statsmodels-0.6.1.p2/statsmodels/graphics/tests/test_tsaplots.py 2016-04-20 21:58:58.717991593 +0200 -@@ -1,4 +1,4 @@ --from statsmodels.compat.python import lmap, lzip, map -+from statsmodels.compat.python import lmap, map - import numpy as np - import pandas as pd - from numpy.testing import dec -@@ -35,8 +35,8 @@ - dta = sm.datasets.elnino.load_pandas().data - dta['YEAR'] = dta.YEAR.astype(int).apply(str) - dta = dta.set_index('YEAR').T.unstack() -- dates = lmap(lambda x : pd.datetools.parse('1 '+' '.join(x)), -- dta.index.values) -+ dates = lmap(lambda x : pd.datetools.parse_time_string('1 '+' '.join(x))[0], -+ dta.index.values) - - # test dates argument - fig = month_plot(dta.values, dates=dates, ylabel='el nino') -diff -ur statsmodels-0.6.1/statsmodels/graphics/tsaplots.py statsmodels-0.6.1.p2/statsmodels/graphics/tsaplots.py ---- statsmodels-0.6.1/statsmodels/graphics/tsaplots.py 2014-10-15 22:27:32.000000000 +0200 -+++ statsmodels-0.6.1.p2/statsmodels/graphics/tsaplots.py 2016-04-20 21:59:52.115102338 +0200 -@@ -187,7 +187,7 @@ - ticks = [] - for season, df in grouped_x: - df = df.copy() # or sort balks for series. may be better way -- df.sort() -+ df.sort_values(inplace=True) - nobs = len(df) - x_plot = np.arange(start, start + nobs) - ticks.append(x_plot.mean()) diff --git a/statsmodels-skiptests.patch b/statsmodels-skiptests.patch deleted file mode 100644 index 3f1b63f..0000000 --- a/statsmodels-skiptests.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ur statsmodels-0.5.0/statsmodels/emplike/tests/test_regression.py statsmodels-0.5.0.ignoretest/statsmodels/emplike/tests/test_regression.py ---- statsmodels-0.5.0/statsmodels/emplike/tests/test_regression.py 2014-01-15 13:41:01.291642617 +0100 -+++ statsmodels-0.5.0.ignoretest/statsmodels/emplike/tests/test_regression.py 2014-01-15 13:42:32.842362114 +0100 -@@ -144,7 +144,7 @@ - beta1ci = self.res1.conf_int_el(1, method='nm') - assert_almost_equal(beta1ci, self.res2.test_ci_beta1, 6) - -- def test_ci_beta2(self): -+ def notest_ci_beta2(self): - beta2ci = self.res1.conf_int_el(2, lower_bound=.59, upper_bound=2.2, method='nm') - assert_almost_equal(beta2ci, self.res2.test_ci_beta2, 6) - -diff -ur statsmodels-0.5.0/statsmodels/regression/tests/test_regression.py statsmodels-0.5.0.ignoretest/statsmodels/regression/tests/test_regression.py ---- statsmodels-0.5.0/statsmodels/regression/tests/test_regression.py 2014-01-15 13:41:01.134641383 +0100 -+++ statsmodels-0.5.0.ignoretest/statsmodels/regression/tests/test_regression.py 2014-01-15 13:43:47.291947102 +0100 -@@ -655,7 +655,7 @@ - np.testing.assert_equal(conf_int.shape, (1, 2)) - np.testing.assert_(isinstance(conf_int, pandas.DataFrame)) - --def test_summary(): -+def notest_summary(): - # test 734 - import re - dta = longley.load_pandas() -diff -ur statsmodels-0.5.0/statsmodels/tools/tests/test_numdiff.py statsmodels-0.5.0.ignoretest/statsmodels/tools/tests/test_numdiff.py ---- statsmodels-0.5.0/statsmodels/tools/tests/test_numdiff.py 2014-01-15 13:41:01.158641571 +0100 -+++ statsmodels-0.5.0.ignoretest/statsmodels/tools/tests/test_numdiff.py 2014-01-15 13:44:34.308316483 +0100 -@@ -204,7 +204,7 @@ - gcs = numdiff.approx_fprime_cs(test_params, fun, args=self.args) - assert_almost_equal(gtrue, gcs, decimal=DEC13) - -- def test_hess_fun1_fd(self): -+ def notest_hess_fun1_fd(self): - for test_params in self.params: - #hetrue = 0 - hetrue = self.hesstrue(test_params) -diff -ur statsmodels-0.5.0/statsmodels/tsa/tests/test_ar.py statsmodels-0.5.0.ignoretest/statsmodels/tsa/tests/test_ar.py ---- statsmodels-0.5.0/statsmodels/tsa/tests/test_ar.py 2014-01-15 13:41:01.201641909 +0100 -+++ statsmodels-0.5.0.ignoretest/statsmodels/tsa/tests/test_ar.py 2014-01-15 13:45:22.385695021 +0100 -@@ -120,7 +120,7 @@ - cls.res1 = AR(data.endog).fit(maxlag=9,method="mle", disp=-1) - cls.res2 = results_ar.ARResultsMLE(constant=True) - -- def test_predict(self): -+ def notest_predict(self): - model = self.res1.model - params = self.res1.params - assert_almost_equal(model.predict(params), self.res2.FVMLEdefault,