Blob Blame History Raw
%global srcname seaborn

Name: python-%{srcname}
Version: 0.7.1
Release: 3%{?dist}
Summary: Statistical data visualization in Python
License: BSD

URL: http://stanford.edu/~mwaskom/software/seaborn/
Source0: https://pypi.io/packages/source/s/seaborn/seaborn-%{version}.tar.gz
# Use system python-six
Patch0: seaborn-0.5.0-six.patch
# Use system python-husl
Patch1: seaborn-0.5.0-husl.patch
# Remove empty 'seaborn.external' subpackage
Patch2: seaborn-0.5.0-external.patch
# Fixes for Python 3.5
Patch3: seaborn-int-div.patch
# https://github.com/mwaskom/seaborn/issues/1025
Patch4: seaborn-matplotlib2.patch
BuildArch: noarch

BuildRequires: python2-devel python3-devel

%description
Seaborn is a library for making attractive and informative statistical
graphics in Python. It is built on top of matplotlib and tightly integrated
with the PyData stack, including support for numpy and pandas data structures
and statistical routines from scipy and statsmodels.


%package -n python2-%{srcname}
Summary: Statistical data visualization in Python

BuildRequires: python2-devel python-setuptools
BuildRequires: numpy scipy python-matplotlib python-pandas
BuildRequires: python-six python-husl
BuildRequires: python-nose
BuildRequires: python-statsmodels

Requires: numpy scipy python-matplotlib python-pandas
Requires: python-six python-husl
Requires: python-nose
Recommends: python-statsmodels

%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
Seaborn is a library for making attractive and informative statistical
graphics in Python. It is built on top of matplotlib and tightly integrated
with the PyData stack, including support for numpy and pandas data structures
and statistical routines from scipy and statsmodels.

%package -n python3-%{srcname}
Summary: Statistical data visualization in Python

BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-numpy python3-scipy
BuildRequires: python3-matplotlib python3-pandas
BuildRequires: python3-six python3-husl
BuildRequires: python3-nose

Requires: python3-numpy python3-scipy
Requires: python3-matplotlib python3-pandas
Requires: python3-six python3-husl
Requires: python3-nose
Recommends: python3-statsmodels

%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Seaborn is a library for making attractive and informative statistical
graphics in Python. It is built on top of matplotlib and tightly integrated
with the PyData stack, including support for numpy and pandas data structures
and statistical routines from scipy and statsmodels.


%prep
%setup -q -n %{srcname}-%{version}
# Remove bundled libraries
%patch0 -p1
%patch1 -p1
%patch2 -p1
rm -rf seaborn/external/
# Test fixes
%patch3 -p1
%patch4 -p1

%build
%py2_build
%py3_build

%install
%py3_install
%py2_install

%check
# Fake matplotlibrc for testing
mkdir matplotlib
touch matplotlib/matplotlibrc
export XDG_CONFIG_HOME=`pwd`
pushd %{buildroot}/%{python2_sitelib}
 nosetests-%{python2_version} -v seaborn
popd

pushd %{buildroot}/%{python3_sitelib}
 nosetests-%{python3_version} -v seaborn
popd

%files -n python2-%{srcname}
%doc README.md
%license LICENSE
%{python2_sitelib}/seaborn
%{python2_sitelib}/seaborn-%{version}-py%{python2_version}.egg-info

%files -n python3-%{srcname}
%doc README.md
%license LICENSE
%{python3_sitelib}/seaborn
%{python3_sitelib}/seaborn-%{version}-py%{python3_version}.egg-info

%changelog
* Wed Sep 28 2016 Dominik Mierzejewski <rpm@greysector.net> - 0.7.1-3
- rebuilt for matplotlib-2.0.0
- fix testsuite failure

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Jul 13 2016 Sergio Pascual <sergiopr@fedoraproject.com> - 0.7.1-1
- New upstream source 0.7.1
- Updated pypi url

* Mon Mar 28 2016 Sergio Pascual <sergiopr@fedoraproject.com> - 0.7.0-1
- New upstream source 0.7.0
- Add patch with fixes for Python 3.5

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Nov 15 2015 Thomas Spura <tomspur@fedoraproject.org> - 0.5.1-7
- Use newer python macros and add python2 subpackage

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Nov 27 2014 Sergio Pascual <sergiopr at fedoraproject.com> - 0.5.1-4
- Add source of LICENSE from upstream, distribution of LICENSE is required

* Thu Nov 27 2014 Sergio Pascual <sergiopr at fedoraproject.com> - 0.5.1-3
- More comments

* Wed Nov 26 2014 Sergio Pascual <sergiopr at fedoraproject.com> - 0.5.1-2
- Added BRs: six and husl

* Mon Nov 17 2014 Sergio Pascual <sergiopr at fedoraproject.com> - 0.5.1-1
- Initial spec