fc0df0c
%global upname astroML
fc0df0c
%global with_python3 1
5bc2c7a
fc0df0c
Name:           python-%{upname}
fc0df0c
Version:        0.3
f423202
Release:        3%{?dist}
5bc2c7a
Summary:        Python tools for machine learning and data mining in Astronomy
5bc2c7a
5bc2c7a
License:        BSD
5bc2c7a
URL:            http://www.astroml.org/
fc0df0c
Source0:        https://github.com/%{upname}/%{upname}/archive/v%{version}.tar.gz
5bc2c7a
5bc2c7a
BuildArch:      noarch
5bc2c7a
BuildRequires:  numpy
5bc2c7a
BuildRequires:  python-astropy
5bc2c7a
BuildRequires:  python2-devel
5bc2c7a
BuildRequires:  python-matplotlib
5bc2c7a
BuildRequires:  python-nose
5bc2c7a
BuildRequires:  python-scikit-learn
5bc2c7a
BuildRequires:  python-setuptools
5bc2c7a
BuildRequires:  scipy
5bc2c7a
BuildRequires:  xorg-x11-server-Xvfb
fc0df0c
%if 0%{?with_python3}
fc0df0c
BuildRequires:  python3-astropy
fc0df0c
BuildRequires:  python3-devel
fc0df0c
BuildRequires:  python3-matplotlib
fc0df0c
BuildRequires:  python3-nose
fc0df0c
BuildRequires:  python3-numpy
fc0df0c
BuildRequires:  python3-scikit-learn
fc0df0c
BuildRequires:  python3-setuptools
fc0df0c
BuildRequires:  python3-scipy
fc0df0c
%endif
5bc2c7a
5bc2c7a
Requires:       numpy
5bc2c7a
Requires:       python-astropy
5bc2c7a
Requires:       python-matplotlib
5bc2c7a
Requires:       python-scikit-learn
5bc2c7a
Requires:       scipy
5bc2c7a
5bc2c7a
%description
5bc2c7a
AstroML is a Python module for machine learning and data mining built on
5bc2c7a
numpy, scipy, scikit-learn, and matplotlib, and distributed under the
5bc2c7a
3-clause BSD license. It contains a growing library of statistical and
5bc2c7a
machine learning routines for analyzing astronomical data in python,
5bc2c7a
loaders for several open astronomical datasets, and a large suite of
5bc2c7a
examples of analyzing and visualizing astronomical datasets.
5bc2c7a
5bc2c7a
fc0df0c
%if 0%{?with_python3}
fc0df0c
%package -n python3-%{upname}
fc0df0c
Summary:        Python tools for machine learning and data mining in Astronomy
fc0df0c
fc0df0c
Requires:       python3-numpy
fc0df0c
Requires:       python3-astropy
fc0df0c
Requires:       python3-matplotlib
fc0df0c
Requires:       python3-scikit-learn
fc0df0c
Requires:       python3-scipy
fc0df0c
fc0df0c
%description -n python3-%{upname}
fc0df0c
AstroML is a Python module for machine learning and data mining built on
fc0df0c
numpy, scipy, scikit-learn, and matplotlib, and distributed under the
fc0df0c
3-clause BSD license. It contains a growing library of statistical and
fc0df0c
machine learning routines for analyzing astronomical data in python,
fc0df0c
loaders for several open astronomical datasets, and a large suite of
fc0df0c
examples of analyzing and visualizing astronomical datasets.
fc0df0c
%endif
fc0df0c
fc0df0c
5bc2c7a
%package doc
fc0df0c
Summary:        Docs and examples for the %{upname} package
5bc2c7a
5bc2c7a
%description doc
fc0df0c
Documentation and examples for %{upname}.
5bc2c7a
5bc2c7a
5bc2c7a
%prep
fc0df0c
%setup -qn %{upname}-%{version}
fc0df0c
%if 0%{?with_python3}
fc0df0c
rm -rf %{py3dir}
fc0df0c
cp -a . %{py3dir}
fc0df0c
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
fc0df0c
%endif # with_python3
fc0df0c
fc0df0c
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
5bc2c7a
5bc2c7a
5bc2c7a
%build
fc0df0c
%if 0%{?with_python3}
fc0df0c
pushd %{py3dir}
fc0df0c
%{__python3} setup.py build
fc0df0c
popd
fc0df0c
%endif # with_python3
fa692f3
%{__python2} setup.py build
5bc2c7a
5bc2c7a
5bc2c7a
%install
fc0df0c
%if 0%{?with_python3}
fc0df0c
pushd %{py3dir}
fc0df0c
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
fc0df0c
popd
fc0df0c
%endif # with_python3
fa692f3
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
5bc2c7a
5bc2c7a
5bc2c7a
%check
f5b6bd2
# Disabled tests as they do not work properly right now :(
f5b6bd2
#%if 0%{?with_python3}
f5b6bd2
#pushd %{py3dir}
f5b6bd2
#xvfb-run -a nosetests-%{python3_version}
f5b6bd2
#popd
f5b6bd2
#%endif # with_python3
f5b6bd2
#xvfb-run -a nosetests-%{python2_version}
5bc2c7a
5bc2c7a
5bc2c7a
%files
fc0df0c
%license LICENSE.rst
fc0df0c
%doc CHANGES.rst CITATION README.rst
fc0df0c
%{python2_sitelib}/%{upname}
fc0df0c
%{python2_sitelib}/%{upname}-%{version}-*.egg-info
5bc2c7a
5bc2c7a
%files doc
fc0df0c
%license LICENSE.rst
fc0df0c
%doc CHANGES.rst CITATION README.rst book_figures examples paper_figures
fc0df0c
fc0df0c
%if 0%{?with_python3}
fc0df0c
%files -n python3-%{upname}
fc0df0c
%license LICENSE.rst
fc0df0c
%doc CHANGES.rst CITATION README.rst
fc0df0c
%{python3_sitelib}/%{upname}
fc0df0c
%{python3_sitelib}/%{upname}-%{version}-*.egg-info
fc0df0c
%endif # with_python3
5bc2c7a
5bc2c7a
5bc2c7a
%changelog
f423202
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-3
f423202
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f423202
fa692f3
* Tue Feb 24 2015 Christian Dersch <chrisdersch@gmail.com> - 0.3-2
fa692f3
- small spec fixes
fa692f3
fc0df0c
* Tue Feb 24 2015 Christian Dersch <chrisdersch@gmail.com> - 0.3-1
fc0df0c
- new upstream release 0.3
fc0df0c
- initial Python 3 support
f5b6bd2
- disabled tests temporarily
fc0df0c
0877070
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2-3
0877070
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0877070
5bc2c7a
* Mon Mar 17 2014 Christian Dersch <chrisdersch@gmail.com> - 0.2-2
5bc2c7a
- fixed spec to match packaging guidelines
5bc2c7a
5bc2c7a
* Mon Feb 24 2014 Christian Dersch <chrisdersch@gmail.com> - 0.2-1
5bc2c7a
- upgrade to version 0.2, addons is now a seperate package (upstream change)
5bc2c7a
5bc2c7a
* Thu Oct 17 2013 Christian Dersch <chrisdersch@gmail.com> - 0.1.2-2
5bc2c7a
- fixed spec to match packaging guidelines
5bc2c7a
5bc2c7a
* Thu Oct 10 2013 Christian Dersch <chrisdersch@gmail.com> - 0.1.2-1
5bc2c7a
- initial spec