File python-statsmodels.spec of Package python-statsmodels

# spec file for package python-statsmodels
# Copyright (c) 2014 SUSE LINUX Products 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

Name:           python-statsmodels
Version:        0.6.0
Release:        0
Summary:        A Python module that allows users to explore data
License:        BSD-3-Clause
Group:          Development/Libraries/Python
BuildRequires:  fdupes
BuildRequires:  python-Cython >= 0.15.1
BuildRequires:  python-devel >= 2.6
BuildRequires:  python-matplotlib >= 1.0.0
BuildRequires:  python-numpy-devel >= 1.5.1
BuildRequires:  python-pandas >= 0.7.1
BuildRequires:  python-patsy >= 0.1.0
BuildRequires:  python-scipy-devel >= 0.7
BuildRequires:  python-setuptools
Requires:       python-numpy >= 1.5.1
Requires:       python-pandas >= 0.7.1
Requires:       python-patsy >= 0.1.0
Requires:       python-scipy >= 0.7
Recommends:     python-matplotlib >= 1.0.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Statsmodels is a Python module that allows users to explore data,
estimate statistical models, and perform statistical tests.
An extensive list of descriptive statistics, statistical tests,
plotting functions, and result statistics are available for different
types of data and each estimator. Researchers across fields may find
that statsmodels fully meets their needs for statistical computing
and data analysis in Python.

%setup -q -n statsmodels-%{version}
find statsmodels -type f -name "*.py" -exec sed -i "/#! \/usr\/bin\/env python/d" {} \;

CFLAGS="%{optflags} -fno-strict-aliasing" python build

python install --root %{buildroot} --prefix=%{_prefix}

# Remove unwanted setup files
find %{buildroot}%{python_sitearch} -name '*' -exec rm {} \;

# Remove duplicates
%fdupes %{buildroot}%{python_sitearch}

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

%doc COPYRIGHTS.txt LICENSE.txt README.rst README_l1.txt examples/