diff --git a/1.2.2.tar.gz b/1.2.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..33b1a2500a0b5378679eea28396fc7ecaded1d36 Binary files /dev/null and b/1.2.2.tar.gz differ diff --git a/python-scikit-learn.spec b/python-scikit-learn.spec new file mode 100644 index 0000000000000000000000000000000000000000..2816220148e4d89a01b830572ecbe2504fe3ea7b --- /dev/null +++ b/python-scikit-learn.spec @@ -0,0 +1,96 @@ +%define anolis_release 1 + +%bcond_with check + +%global srcname scikit-learn + +%global _description %{expand: +Scikit-learn integrates machine learning algorithms in the tightly-knit +scientific Python world, building upon numpy, scipy, and matplotlib. +As a machine-learning module, it provides versatile tools for data mining +and analysis in any field of science and engineering. It strives to be +simple and efficient, accessible to everybody, and reusable +in various contexts.} + +Name: python-scikit-learn +Version: 1.2.2 +Release: %{anolis_release}%{dist} + +Summary: Machine learning in Python +# sklearn/externals/_arff.py is MIT +# sklearn/src/liblinear is BSD +# sklearn/src/libsvm is BSD +License: BSD and MIT + +URL: http://scikit-learn.org/ +Source0: https://github.com/scikit-learn/scikit-learn/archive/refs/tags/1.2.2.tar.gz + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} + +%description %_description + +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: %{py3_dist Cython} +BuildRequires: %{py3_dist numpy} >= 1.19 +BuildRequires: %{py3_dist scipy} +# Testing +%if %{with check} +BuildRequires: python3-pytest +BuildRequires: %{py3_dist joblib} +BuildRequires: python3-threadpoolctl >= 2.0.0 +%endif + +%{?python_provide:%python_provide python3-sklearn} + +%description -n python3-%{srcname} %_description + +%package -n python3-%{srcname}-doc +Summary: Documentation files for %{name} +Requires: python3-%{srcname} = %{EVR} +BuildArch: noarch + +%description -n python3-%{srcname}-doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -n %{srcname}-%{version} -p1 + +%build +%py3_build + +%install +%py3_install + +%if %{with check} +%check +export PYTHONDONTWRITEBYTECODE=1 +export PYTEST_ADDOPTS='-p no:cacheprovider' +pushd %{buildroot}%{python3_sitearch} + pytest \ + --deselect "metrics/tests/test_common.py::test_not_symmetric_metric[precision_recall_curve]" \ + --deselect "metrics/tests/test_common.py::test_binary_sample_weight_invariance[precision_recall_curve]" \ + --deselect "datasets/tests/test_openml.py::test_fetch_openml_verify_checksum[True]" \ + --deselect "datasets/tests/test_openml.py::test_fetch_openml_verify_checksum[False]" \ + --deselect "cross_decomposition/tests/test_pls.py::test_loadings_converges" \ + --deselect "covariance/tests/test_graphical_lasso.py::test_graphical_lasso" \ + --deselect "gaussian_process/tests/test_gpr.py::test_lml_precomputed[kernel3]" \ + --deselect "gaussian_process/tests/test_gpr.py::test_lml_precomputed[kernel4]" \ + sklearn +popd +%endif + +%files -n python3-%{srcname} +%license COPYING sklearn/svm/src/liblinear/COPYRIGHT +%{python3_sitearch}/sklearn +%{python3_sitearch}/scikit_learn-*.egg-info + +%files -n python3-%{srcname}-doc +%doc examples/ README.rst + +%changelog +* Mon Mar 27 2023 yuanhui - 1.2.2-1 +- Init package from upstream