[python-seaborn] Import python-seaborn
Sergio Pascual
sergiopr at fedoraproject.org
Mon Dec 1 19:00:38 UTC 2014
commit 6f821037506c6eebcc7f8cd6f7b784e4c91e677f
Author: Sergio Pascual <sergiopr at fis.ucm.es>
Date: Mon Dec 1 20:00:23 2014 +0100
Import python-seaborn
.gitignore | 1 +
LICENSE | 27 ++++++++
python-seaborn.spec | 135 ++++++++++++++++++++++++++++++++++++++++++
seaborn-0.5.0-external.patch | 12 ++++
seaborn-0.5.0-husl.patch | 12 ++++
seaborn-0.5.0-six.patch | 112 ++++++++++++++++++++++++++++++++++
sources | 1 +
7 files changed, 300 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..294fb6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/seaborn-0.5.1.tar.gz
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c6b4209
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2013, Michael L. Waskom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the {organization} nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/python-seaborn.spec b/python-seaborn.spec
new file mode 100644
index 0000000..3a92650
--- /dev/null
+++ b/python-seaborn.spec
@@ -0,0 +1,135 @@
+%global with_python3 1
+%global upname seaborn
+
+Name: python-%{upname}
+Version: 0.5.1
+Release: 4%{?dist}
+Summary: Statistical data visualization in Python
+# The source in pypi contains only the package code
+# no readme, no license
+# https://github.com/mwaskom/seaborn/issues/378
+License: BSD
+
+URL: http://stanford.edu/~mwaskom/software/seaborn/
+Source0: https://pypi.python.org/packages/source/s/seaborn/seaborn-%{version}.tar.gz
+# License from upstream repository
+Source1: https://raw.githubusercontent.com/mwaskom/seaborn/master/LICENSE
+# Use system python-six
+Patch0: seaborn-0.5.0-six.patch
+# Use system python-husl
+Patch1: seaborn-0.5.0-husl.patch
+# Remove expty 'seaborn.external' subpackage
+Patch2: seaborn-0.5.0-external.patch
+BuildArch: noarch
+
+BuildRequires: python2-devel python-setuptools
+BuildRequires: numpy scipy python-matplotlib python-pandas
+BuildRequires: python-six python-husl
+BuildRequires: python-nose
+Requires: numpy scipy python-matplotlib python-pandas
+Requires: python-six python-husl
+Requires: python-nose
+
+%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.
+
+%if 0%{?with_python3}
+%package -n python3-%{upname}
+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
+
+%description -n python3-%{upname}
+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.
+
+%endif # with_python3
+
+%prep
+%setup -q -n %{upname}-%{version}
+# Remove bundled libraries
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+rm -rf seaborn/external/
+cp %{SOURCE1} .
+
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+%build
+%{__python2} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+%check
+# Fake matplotlibrc for testing
+mkdir matplotlib
+touch matplotlib/matplotlibrc
+export XDG_CONFIG_HOME=`pwd`
+pushd %{buildroot}/%{python2_sitelib}
+nosetests-%{python2_version} -x seaborn
+popd
+
+%if 0%{?with_python3}
+pushd %{buildroot}/%{python3_sitelib}
+nosetests-%{python3_version} -x seaborn
+popd
+
+%endif # with_python3
+
+%files
+%doc LICENSE
+%{python2_sitelib}/seaborn
+%{python2_sitelib}/seaborn-%{version}-py%{python2_version}.egg-info
+
+%if 0%{?with_python3}
+%doc LICENSE
+%files -n python3-%{upname}
+%{python3_sitelib}/seaborn
+%{python3_sitelib}/seaborn-%{version}-py%{python3_version}.egg-info
+%endif # with_python3
+
+%changelog
+* 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
+
diff --git a/seaborn-0.5.0-external.patch b/seaborn-0.5.0-external.patch
new file mode 100644
index 0000000..38f762c
--- /dev/null
+++ b/seaborn-0.5.0-external.patch
@@ -0,0 +1,12 @@
+diff -ur seaborn-0.5.0/setup.py seaborn-0.5.0.ex/setup.py
+--- seaborn-0.5.0/setup.py 2014-11-23 18:46:19.249823319 +0100
++++ seaborn-0.5.0.ex/setup.py 2014-11-23 18:46:07.282723397 +0100
+@@ -75,7 +75,7 @@
+ version=VERSION,
+ download_url=DOWNLOAD_URL,
+ install_requires=install_requires,
+- packages=['seaborn', 'seaborn.external', 'seaborn.tests'],
++ packages=['seaborn', 'seaborn.tests'],
+ classifiers=[
+ 'Intended Audience :: Science/Research',
+ 'Programming Language :: Python :: 2.7',
diff --git a/seaborn-0.5.0-husl.patch b/seaborn-0.5.0-husl.patch
new file mode 100644
index 0000000..67638ea
--- /dev/null
+++ b/seaborn-0.5.0-husl.patch
@@ -0,0 +1,12 @@
+diff -ur seaborn-0.5.0/seaborn/palettes.py seaborn-0.5.0.husl/seaborn/palettes.py
+--- seaborn-0.5.0/seaborn/palettes.py 2014-11-21 17:39:01.857208896 +0100
++++ seaborn-0.5.0.husl/seaborn/palettes.py 2014-11-21 17:40:13.439805983 +0100
+@@ -6,7 +6,7 @@
+ import matplotlib as mpl
+ from matplotlib.colors import LinearSegmentedColormap
+
+-from .external import husl
++import husl
+ from six import string_types
+ from six.moves import range
+
diff --git a/seaborn-0.5.0-six.patch b/seaborn-0.5.0-six.patch
new file mode 100644
index 0000000..4180ec8
--- /dev/null
+++ b/seaborn-0.5.0-six.patch
@@ -0,0 +1,112 @@
+diff -ur seaborn-0.5.0/seaborn/algorithms.py seaborn-0.5.0.six/seaborn/algorithms.py
+--- seaborn-0.5.0/seaborn/algorithms.py 2014-11-21 15:56:40.662579642 +0100
++++ seaborn-0.5.0.six/seaborn/algorithms.py 2014-11-21 15:52:36.785480490 +0100
+@@ -2,7 +2,7 @@
+ from __future__ import division
+ import numpy as np
+ from scipy import stats
+-from .external.six.moves import range
++from six.moves import range
+
+
+ def bootstrap(*args, **kwargs):
+diff -ur seaborn-0.5.0/seaborn/distributions.py seaborn-0.5.0.six/seaborn/distributions.py
+--- seaborn-0.5.0/seaborn/distributions.py 2014-11-21 15:56:40.656579590 +0100
++++ seaborn-0.5.0.six/seaborn/distributions.py 2014-11-21 15:53:11.712781124 +0100
+@@ -15,7 +15,7 @@
+ except ImportError:
+ _has_statsmodels = False
+
+-from .external.six.moves import range
++from six.moves import range
+
+ from .utils import set_hls_values, desaturate, percentiles, iqr, _kde_support
+ from .palettes import color_palette, husl_palette, blend_palette
+Sólo en seaborn-0.5.0/seaborn/external: six.py
+diff -ur seaborn-0.5.0/seaborn/linearmodels.py seaborn-0.5.0.six/seaborn/linearmodels.py
+--- seaborn-0.5.0/seaborn/linearmodels.py 2014-11-21 15:56:40.674579746 +0100
++++ seaborn-0.5.0.six/seaborn/linearmodels.py 2014-11-21 15:53:37.137999969 +0100
+@@ -15,8 +15,8 @@
+ except ImportError:
+ _has_statsmodels = False
+
+-from .external.six import string_types
+-from .external.six.moves import range
++from six import string_types
++from six.moves import range
+
+ from . import utils
+ from . import algorithms as algo
+diff -ur seaborn-0.5.0/seaborn/matrix.py seaborn-0.5.0.six/seaborn/matrix.py
+--- seaborn-0.5.0/seaborn/matrix.py 2014-11-21 15:56:40.662579642 +0100
++++ seaborn-0.5.0.six/seaborn/matrix.py 2014-11-21 15:53:49.866109525 +0100
+@@ -13,7 +13,7 @@
+ from .axisgrid import Grid
+ from .palettes import cubehelix_palette
+ from .utils import despine, axis_ticklabels_overlap
+-from .external.six.moves import range
++from six.moves import range
+
+
+ def _index_to_label(index):
+diff -ur seaborn-0.5.0/seaborn/miscplot.py seaborn-0.5.0.six/seaborn/miscplot.py
+--- seaborn-0.5.0/seaborn/miscplot.py 2014-11-21 15:56:40.663579651 +0100
++++ seaborn-0.5.0.six/seaborn/miscplot.py 2014-11-21 15:54:04.851238509 +0100
+@@ -28,7 +28,7 @@
+
+ def puppyplot(grown_up=False):
+ """Plot today's daily puppy. Only works in the IPython notebook."""
+- from .external.six.moves.urllib.request import urlopen
++ from six.moves.urllib.request import urlopen
+ from IPython.display import HTML
+ try:
+ from bs4 import BeautifulSoup
+diff -ur seaborn-0.5.0/seaborn/palettes.py seaborn-0.5.0.six/seaborn/palettes.py
+--- seaborn-0.5.0/seaborn/palettes.py 2014-11-21 15:56:40.659579616 +0100
++++ seaborn-0.5.0.six/seaborn/palettes.py 2014-11-21 15:54:21.264379783 +0100
+@@ -7,8 +7,8 @@
+ from matplotlib.colors import LinearSegmentedColormap
+
+ from .external import husl
+-from .external.six import string_types
+-from .external.six.moves import range
++from six import string_types
++from six.moves import range
+
+ from .utils import desaturate, set_hls_values
+ from .xkcd_rgb import xkcd_rgb
+diff -ur seaborn-0.5.0/seaborn/tests/test_algorithms.py seaborn-0.5.0.six/seaborn/tests/test_algorithms.py
+--- seaborn-0.5.0/seaborn/tests/test_algorithms.py 2014-11-21 15:56:40.668579694 +0100
++++ seaborn-0.5.0.six/seaborn/tests/test_algorithms.py 2014-11-21 15:55:26.457940932 +0100
+@@ -1,6 +1,6 @@
+ import numpy as np
+ from scipy import stats
+-from ..external.six.moves import range
++from six.moves import range
+
+ import numpy.testing as npt
+ from numpy.testing import assert_array_equal
+diff -ur seaborn-0.5.0/seaborn/tests/test_matrix.py seaborn-0.5.0.six/seaborn/tests/test_matrix.py
+--- seaborn-0.5.0/seaborn/tests/test_matrix.py 2014-11-21 15:56:40.671579720 +0100
++++ seaborn-0.5.0.six/seaborn/tests/test_matrix.py 2014-11-21 15:55:42.904082491 +0100
+@@ -15,7 +15,7 @@
+
+ from .. import matrix as mat
+ from .. import color_palette
+-from ..external.six.moves import range
++from six.moves import range
+
+ try:
+ import fastcluster
+diff -ur seaborn-0.5.0/seaborn/timeseries.py seaborn-0.5.0.six/seaborn/timeseries.py
+--- seaborn-0.5.0/seaborn/timeseries.py 2014-11-21 15:56:40.657579599 +0100
++++ seaborn-0.5.0.six/seaborn/timeseries.py 2014-11-21 15:54:39.628537852 +0100
+@@ -6,7 +6,7 @@
+ import matplotlib as mpl
+ import matplotlib.pyplot as plt
+
+-from .external.six import string_types
++from six import string_types
+
+
+ from . import utils
diff --git a/sources b/sources
index e69de29..37d2c84 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2ce6ea7d3c67858c0b1f5793fa2043b8 seaborn-0.5.1.tar.gz
More information about the scm-commits
mailing list