File spyder.spec of Package spyder

#
# spec file for package spyder
#
# 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/
#


Name:           spyder
Version:        2.2.1
Release:        0
Url:            http://spyderlib.googlecode.com
Summary:        Scientific PYthon Development EnviRonment
License:        MIT
Group:          Development/Languages/Python
Source:         http://spyderlib.googlecode.com/files/%{name}-%{version}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  IPython
BuildRequires:  fdupes
BuildRequires:  python-Sphinx >= 0.6.0
BuildRequires:  python-devel >= 2.5
BuildRequires:  python-matplotlib
BuildRequires:  python-numpy
BuildRequires:  python-pep8
BuildRequires:  python-psutil
BuildRequires:  python-pyflakes >= 0.5.0
BuildRequires:  python-pylint
BuildRequires:  python-qt4 >= 4.4
BuildRequires:  python-rope => 0.9.0
BuildRequires:  python-scipy
BuildRequires:  unzip
%if 0%{?suse_version} <= 1210
BuildRequires:  update-desktop-files
%endif
Requires:       python-spyderlib = %{version}
%if 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
A Scientific Python development environment, an alternative to IDLE 
with powerful interactive features such as variable explorer (with
GUI-based editors for dictionaries, lists, NumPy arrays, etc.), object
inspector, online help, and a lot more.

%package -n python-spyderlib
Summary:        Python GUI components
Group:          Development/Languages/Python
Requires:       python-Sphinx >= 0.6.0
Requires:       python-qt4 >= 4.4
Recommends:     IPython
Recommends:     python-matplotlib
Recommends:     python-numpy
Recommends:     python-pep8
Recommends:     python-psutil
Recommends:     python-pyflakes >= 0.5.0
Recommends:     python-pylint
Recommends:     python-rope >= 0.9.0
Recommends:     python-scipy

%description -n python-spyderlib
The spyderlib module provides powerful console and
editor related widgets to your PyQt4 application.

%package doc
Summary:        Documentation for %{name} and spyderlib
Group:          Development/Languages/Python
Requires:       %{name} = %{version}

%description doc
Documentation and help files for both %{name} and spyderlib

%lang_package
%prep
%setup -q

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# remove windows stuff
rm %{buildroot}%{_bindir}/spyder_win_post_install.py
# create missing directories
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
# install the icon
pushd %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
ln -s %{python_sitelib}/spyderlib/images/spyder.svg
popd
%find_lang spyderlib
%if 0%{?suse_version} <= 1210
%suse_update_desktop_file spyder
%endif
%fdupes %{buildroot}%{python_sitelib}
# Documentation belongs into %{_docdir}:
rm -r %{buildroot}%{python_sitelib}/spyderlib/doc

%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/%{name}
%{_datadir}/applications/spyder.desktop
%{_datadir}/icons/hicolor/scalable/apps/spyder.svg
%{_datadir}/pixmaps/spyder.png

%files -n python-spyderlib
%defattr(-,root,root,-)
%{python_sitelib}/spyderlib/
%{python_sitelib}/spyderplugins/
%{python_sitelib}/%{name}-%{version}-py%{py_ver}.egg-info
%exclude %{python_sitelib}/spyderlib/locale/

%files doc
%defattr(-,root,root,-)
%doc build/lib/spyderlib/doc/

%files lang -f spyderlib.lang
%defattr(-,root,root)
%{python_sitelib}/spyderlib/locale

%changelog
openSUSE Build Service is sponsored by