File python-pmw.spec of Package python-pmw
#
# spec file for package python-pmw
#
# 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: python-pmw
Version: 1.3.2
Release: 0
Url: http://pmw.sourceforge.net/
Summary: High-level compound widgets in Python using the Tkinter module
License: MIT
Group: Development/Libraries/Python
Source: %{name}-%{version}.tar.bz2
Patch0: 1-extra-test.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
A toolkit for building high-level compound widgets in Python using the Tkinter
module. It contains a set of flexible and extensible megawidgets, including
notebooks, comboboxes, selection widgets, paned widgets, scrolled widgets and
dialog windows.
%prep
%setup -q -n %{name}-%{version}/src
%patch0
sed -i '1d' Pmw/Pmw_1_3/{demos/All,bin/bundlepmw,tests/All,tests/ManualTests}.py # Fix non-executable scripts
%build
python setup.py build
%install
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}/%{_prefix}
%endif
%files
%defattr(-,root,root)
%doc Pmw/README Pmw/Pmw_1_3/demos Pmw/Pmw_1_3/doc
%{python_sitelib}/*
%changelog