diff --git a/python-statsmodels.spec b/python-statsmodels.spec new file mode 100644 index 0000000000000000000000000000000000000000..9254b34c9ea849f5a3a2494785c7965afac8dcbf --- /dev/null +++ b/python-statsmodels.spec @@ -0,0 +1,106 @@ +%bcond_with check +%bcond_with doc + +%global srcname statsmodels + +Name: python-%{srcname} +Version: 0.12.2 +Release: 1 +Summary: Statistics in Python + +License: BSD and Public Domain +URL: https://www.statsmodels.org/ +Source0: https://github.com/statsmodels/statsmodels/archive/refs/tags/v0.12.2.tar.gz + +BuildRequires: gcc +BuildRequires: python3-devel + +%description +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: %{summary} + +BuildRequires: %{py3_dist setuptools} +BuildRequires: %{py3_dist Cython} +BuildRequires: %{py3_dist scipy} >= 1.1 +%if %{with check} +BuildRequires: xorg-x11-server-Xvfb +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist matplotlib} +BuildRequires: python3-matplotlib-tk +BuildRequires: %{py3_dist pandas} +BuildRequires: %{py3_dist patsy} +%endif + +%description -n python3-%{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}-doc +Summary: Documentation for %{srcname}, includes full API docs +BuildArch: noarch + +%if %{with doc} +BuildRequires: graphviz +BuildRequires: python3-sphinx +BuildRequires: python3-numpydoc +BuildRequires: python3-ipython-sphinx +BuildRequires: python3-matplotlib +%endif + +%description -n python3-%{srcname}-doc +This package contains the full API documentation for python3-%{srcname}. + +%prep +%autosetup -n %{srcname}-%{version} -p1 +find . -type f -exec chmod -x {} \; + +pushd statsmodels + # Copy license files + cp -a stats/libqsturng/LICENSE.txt ../LICENSE.libqsturng.txt + + # remove shebangs + #sed -i -e "1d" regression/quantile_regression.py +popd + +%build +%py3_build + +%install +%py3_install + +%if %{with check} +%check +# False matplotlibrc +mkdir -p matplotlib +touch matplotlib/matplotlibrc +export XDG_CONFIG_HOME=`pwd` +export PYTHONDONTWRITEBYTECODE=1 +export PYTEST_ADDOPTS='-p no:cacheprovider' +pushd %{buildroot}/%{python3_sitearch} + xvfb-run pytest %{srcname} +popd +%endif + +%files -n python3-%{srcname} +%license LICENSE.txt LICENSE.libqsturng.txt +%doc COPYRIGHTS.txt README_l1.txt README.rst +%{python3_sitearch}/statsmodels +%{python3_sitearch}/statsmodels-*-py*.egg-info +%exclude %{python3_sitearch}/statsmodels/LICENSE.txt + +%files -n python3-%{srcname}-doc +%license LICENSE.txt LICENSE.libqsturng.txt +## %doc build/sphinx/html + +%changelog +* Sat Jul 17 2021 yinyongkang - 0.12.2-1 +- Init Package diff --git a/v0.12.2.tar.gz b/v0.12.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..67a0b9242eb0404d44b34fd7d61f16666d0f4c66 Binary files /dev/null and b/v0.12.2.tar.gz differ