File python-SpikeSort.spec of Package python-SpikeSort

#
# spec file for package python-SpikeSort
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#


%define modname SpikeSort
%define pyname  spike_sort
Name:           python-%{modname}
Version:        0.12
Release:        0
%define rver    0.1
%define gitver  g68dbc21
%define gitver2 0cbdc95
Summary:        Spike sorting library implemented in Python/NumPy/PyTables
License:        BSD-2-Clause
Group:          Development/Languages/Python
Url:            http://spikesort.org
Source:         btel-%{modname}-v%{version}-0-%{gitver}.tar.gz
BuildRequires:  python-NeuroTools
BuildRequires:  python-devel >= 2.6
BuildRequires:  python-matplotlib
BuildRequires:  python-numpy-devel
BuildRequires:  python-scikit-learn
BuildRequires:  python-setuptools
Recommends:     python-neurotools
Recommends:     python-scikit-learn
Requires:       python-NeuroTools
Requires:       python-matplotlib
Requires:       python-numpy
Recommends:     python-scipy
Recommends:     python-tables
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%else
BuildArch:      noarch
Requires:       python(abi) >= %{py_ver}
%endif

%description
SpikeSort is a flexible spike sorting framework implemented 
completely in Python. It features manual and automatic clustering,
many data formats and it is memory-efficient. Truely Open Source, 
BSD-licensed.

%prep
%setup -q -n btel-%{modname}-%{gitver2}

%build
CFLAGS="%{optflags}" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod +x %{buildroot}%{python_sitelib}/%{pyname}/__init__.py
chmod +x %{buildroot}%{python_sitelib}/%{pyname}/core/{__init__,cluster,evaluate,extract,features}.py
chmod +x %{buildroot}%{python_sitelib}/%{pyname}/ui/plotting.py
chmod +x %{buildroot}%{python_sitelib}/spike_analysis/{dashboard,io_tools,xcorr}.py

%files
%defattr(-,root,root,-)
%{python_sitelib}/%{pyname}/
%{python_sitelib}/spike_analysis/
%{python_sitelib}/spike_beans/
%{python_sitelib}/%{modname}-%{rver}-py%{py_ver}.egg-info/

%changelog
openSUSE Build Service is sponsored by