File winpdb.spec of Package winpdb
#
# spec file for package python-winpdb
#
# Copyright (c) 2011 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: winpdb
Version: 1.4.8
Release: 0
Url: http://www.winpdb.org
Summary: Python debugger GUI
License: GPL-2.0+
Group: Development/Languages/Python
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}.png
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: update-desktop-files
Requires: python(abi) = %{py_ver}
Requires: rpdb = %{version}
%if 0%{?suse_version} > 1110
BuildArch: noarch
BuildRequires: python-wxWidgets
Requires: python-wxWidgets
%else
BuildRequires: python-wxGTK
Requires: python-wxGTK
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif
%description
Winpdb is a platform independent GPL Python debugger with support for multiple
threads, namespace modification, embedded debugging, encrypted communication and
is up to 20 times faster than pdb.
%package -n rpdb
Summary: Remote Python debugger
Group: Development/Languages/Python
Requires: python(abi) = %{py_ver}
%description -n rpdb
A fast, remote Python debugging interpreter
%prep
%setup -q
sed -si "s|\r||" README.txt # Fix wrong line ending
%build
export CFLAGS="%{optflags}"
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod a+x %{buildroot}%{python_sitelib}/%{name}.py
chmod a+x %{buildroot}%{python_sitelib}/rpdb2.py
# install icon and .desktop file
install -pm 0755 %{SOURCE1} ./%{name}.desktop
%suse_update_desktop_file -i %{name}
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{python_sitelib}/%{name}.py*
%{python_sitelib}/%{name}-%{version}-py*.egg-info
%files -n rpdb
%defattr(-,root,root,-)
%doc README.txt
%{_bindir}/rpdb2
%{python_sitelib}/rpdb2.py*
%changelog