File python-rodeo.spec of Package python-rodeo

#
# spec file for package python-rodeo
#
# Copyright (c) 2015 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/
#


Name:           python-rodeo
Version:        0.4.3
Release:        0
Summary:        IDE for data analysis in python
License:        BSD-2-Clause
Group:          Development/Languages/Python
Url:            https://github.com/yhat/rodeo/
Source:         https://pypi.python.org/packages/source/r/rodeo/rodeo-%{version}.tar.gz
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  IPython >= 3.0.0
BuildRequires:  python-Flask >= 0.10.1
BuildRequires:  python-docopt
BuildRequires:  python-pyzmq >= 13
Requires:       IPython >= 3.0.0
Requires:       python-mistune
Requires:       python-Flask >= 0.10.1
Requires:       python-docopt
Requires:       python-mistune
Requires:       python-pyzmq >= 13
Requires(post): update-alternatives
Requires(postun): update-alternatives
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()")}
%else
BuildArch:      noarch
%endif

%description
Rodeo is a data centric IDE for Python. You can think of it as an
alternative UI to the notebook for the IPython Kernel. It's heavily
inspired by great projects like Sublime Text and Eclipse.

%prep
%setup -q -n rodeo-%{version}

%build
python setup.py build

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

# Prepare for update-alternatives usage
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
mv %{buildroot}%{_bindir}/rodeo %{buildroot}%{_bindir}/rodeo-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/rodeo %{buildroot}%{_bindir}/rodeo
# create a dummy target for /etc/alternatives/rodeo
touch %{buildroot}%{_sysconfdir}/alternatives/rodeo
ln -s -f %{_bindir}/rodeo-%{py_ver} %{buildroot}%{_bindir}/rodeo2

%post
"%_sbindir/update-alternatives" \
   --install %{_bindir}/rodeo rodeo %{_bindir}/rodeo-%{py_ver} 30

%postun
if [ $1 -eq 0 ] ; then
    "%_sbindir/update-alternatives" --remove rodeo %{_bindir}/rodeo-%{py_ver}
fi

%files
%defattr(-,root,root,-)
%doc README.rst
%{_bindir}/rodeo
%{_bindir}/rodeo2
%{_bindir}/rodeo-%{py_ver}
%ghost %{_sysconfdir}/alternatives/rodeo
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by