From 27b187a80a91d1d3609e0b39223cb8251b30941534da86eb9b5d69dee4e4802f Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 16 Aug 2011 10:37:24 +0000 Subject: [PATCH] - Spec file cleanup: * Package documentation * Version-checks around SUSE-specific macros OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pmw?expand=0&rev=2 --- python-pmw.changes | 7 +++++ python-pmw.spec | 70 ++++++++++++++++++++++------------------------ 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/python-pmw.changes b/python-pmw.changes index 724f449..b5382bb 100644 --- a/python-pmw.changes +++ b/python-pmw.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 16 09:51:31 UTC 2011 - saschpe@suse.de + +- Spec file cleanup: + * Package documentation + * Version-checks around SUSE-specific macros + ------------------------------------------------------------------- Tue May 10 19:00:49 UTC 2011 - dhall@wustl.edu diff --git a/python-pmw.spec b/python-pmw.spec index df8b3cd..2fd4c99 100644 --- a/python-pmw.spec +++ b/python-pmw.spec @@ -1,7 +1,7 @@ # -# spec file for package +# spec file for package python-pmw # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -15,52 +15,50 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: python-pmw -BuildRequires: python -BuildRequires: fdupes -Version: 1.3.2 -Release: 0 -License: MIT -Summary: High-level compound widgets in Python using the Tkinter module -Url: http://pmw.sourceforge.net/ -Group: Development/Libraries/Python -Source: %{name}-%{version}.tar.bz2 +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 -AutoReqProv: on -BuildArch: noarch -Patch: 1-extra-test.patch -%{py_requires} +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 %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. - -Authors: --------- -Greg McFarlane -Serge Hulne +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 -%patch +%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} \ - --record-rpm=INSTALLED_FILES -%fdupes %{buildroot} +python setup.py install --root=%{buildroot} --prefix=%{_prefix} +%if 0%{?suse_version} > 1010 +%fdupes %{buildroot}/%{_prefix} +%endif -%clean -%{?buildroot:%__rm -rf "%{buildroot}"} - -%files -f INSTALLED_FILES +%files %defattr(-,root,root) -%attr(755,-,-) %{python_sitelib}/Pmw/Pmw_1_3/demos/All.py -%attr(755,-,-) %{python_sitelib}/Pmw/Pmw_1_3/bin/bundlepmw.py -%attr(755,-,-) %{python_sitelib}/Pmw/Pmw_1_3/tests/ManualTests.py -%attr(755,-,-) %{python_sitelib}/Pmw/Pmw_1_3/tests/All.py +%doc Pmw/README Pmw/Pmw_1_3/demos Pmw/Pmw_1_3/doc +%{python_sitelib}/* %changelog