%global upname scikit-learn
Name: python-scikit-learn
Version: 0.13.1
Release: 3%{?dist}
Summary: Machine learning in Python
License: BSD
# No license file
# webpage says: BSD (3 clause)
# part of the files in sklearn/src/cblas: BSD (2 clause)
# part of the files in sklearn/src/cblas: BSD (3 clause)
URL: http://scikit-learn.org/
Source0: https://pypi.python.org/packages/source/s/scikit-learn/%{upname}-%{version}.tar.gz
BuildRequires: python2-devel
BuildRequires: numpy
BuildRequires: atlas-devel
BuildRequires: blas-devel
BuildRequires: scipy
BuildRequires: python-nose
Requires: numpy
Requires: scipy
# we don't want to provide private python extension libs
%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$
%description
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.
%prep
%setup -n %{upname}-%{version} -q
rm -rf *egg-info
# Removing bogus shebang
pushd sklearn/datasets
sed -i -e "1d" setup.py
popd
pushd sklearn/gaussian_process/
sed -i -e "1d" gaussian_process.py regression_models.py __init__.py correlation_models.py
popd
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
%{__python} setup.py install --skip-build --root %{buildroot}
find %{buildroot} -name "*.so" | xargs chmod 755
%check
%{__python} setup.py install --skip-build --root testme
pushd testme/%{python_sitearch}
nosetests sklearn
popd
%files
%doc examples/ AUTHORS.rst README.rst
%{python_sitearch}/sklearn
%{python_sitearch}/scikit_learn-*.egg-info
%changelog
* Wed Jul 10 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.13.1-3
- Reorder buildrequires and requires
- Dropped doc, it does not build
* Tue Jun 25 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.13.1-2
- Changed package name
- Tests do not need recompile
* Thu Apr 18 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.13.1-1
- Initial spec file