File python-pandas.spec of Package python-pandas

#
# spec file for package python-pandas
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define modname pandas
Name:           python-%{modname}
Version:        0.17.1
Release:        0
Summary:        Make working with "relational" or "labeled" data both easy and intuitive
License:        BSD-3-Clause
Group:          Development/Libraries/Python
Url:            http://pandas.pydata.org/
Source0:        https://pypi.python.org/packages/source/p/pandas/%{modname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 0001_respect_byteorder_in_statareader.patch https://github.com/pydata/pandas/issues/11282
Patch1:         0001_respect_byteorder_in_statareader.patch
# PATCH-FIX-OPENSUSE 0001_disable_experimental_msgpack_big_endian.patch https://github.com/pydata/pandas/issues/11282
Patch2:         0001_disable_experimental_msgpack_big_endian.patch
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  python-Cython
BuildRequires:  python-Sphinx
BuildRequires:  python-dateutil >= 1.5
BuildRequires:  python-nose
BuildRequires:  python-numpy-devel >= 1.7.1
BuildRequires:  python-pytz
BuildRequires:  python-setuptools
Requires:       python-Bottleneck
Requires:       python-dateutil >= 1.5
Requires:       python-numexpr >= 2.1
Requires:       python-numpy >= 1.7.1
Requires:       python-pytz
Recommends:     google-api-python-client
Recommends:     python-Jinja2
Recommends:     python-SQLAlchemy
Recommends:     python-beautifulsoup4
Recommends:     python-blosc
Recommends:     python-boto
Recommends:     python-html5lib
Recommends:     python-httplib2
Recommends:     python-lxml
Recommends:     python-matplotlib
Recommends:     python-openpyxl
Recommends:     python-python-gflags
Recommends:     python-scipy
Recommends:     python-setuptools
Recommends:     python-statsmodels
Recommends:     python-tables
Recommends:     python-xlrd
Recommends:     python-xlsxwriter
Recommends:     python-xlwt
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

%description
pandas is a Python package providing fast, flexible, and expressive
data structures designed to make working with "relational" or
"labeled" data both easy and intuitive. It aims to be the fundamental
high-level building block for doing practical, real world data
analysis in Python. Additionally, it has the broader goal of becoming
the most powerful and flexible open source data analysis /
manipulation tool available in any language.

%package doc
Summary:        Documentation for %{name}
Group:          Development/Libraries/Python
Recommends:     %{name} = %{version}

%description doc
Documentation, help files, and examples for %{name}

%prep
%setup -q -n pandas-%{version}
%patch1 -p1
%patch2 -p1

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build_ext --inplace
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build

%install
python setup.py install --root %{buildroot} --prefix=%{_prefix}

pushd doc
python make.py html
popd

rm -r %{buildroot}%{python_sitearch}/pandas/tests
%fdupes %{buildroot}%{python_sitearch}

# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitearch}
%py_compile .
popd

%check
nosetests pandas

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc LICENSE doc/README.rst RELEASE.md
%{python_sitearch}/%{modname}
%{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info

%files doc
%defattr(-,root,root)
%doc doc/build/html/

%changelog
openSUSE Build Service is sponsored by