From a26194c7fbb6c5effd12a1716c9c66dfbef117122498feffe4e32e1b14e08014 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 31 Jan 2012 13:01:14 +0000 Subject: [PATCH] - Spec file cleanup: * Simplified macro mania * Removed unused build requirements * Set license to SDPX style (LGPL-3.0+) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-progressbar?expand=0&rev=2 --- python-progressbar.changes | 8 +++++ python-progressbar.spec | 70 ++++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/python-progressbar.changes b/python-progressbar.changes index 04bd300..f428599 100644 --- a/python-progressbar.changes +++ b/python-progressbar.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 31 13:00:34 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Simplified macro mania + * Removed unused build requirements + * Set license to SDPX style (LGPL-3.0+) + ------------------------------------------------------------------- Thu Jun 16 20:08:05 CET 2011 - pascal.bleser@opensuse.org diff --git a/python-progressbar.spec b/python-progressbar.spec index 00c0659..1a0060f 100644 --- a/python-progressbar.spec +++ b/python-progressbar.spec @@ -1,23 +1,36 @@ -# vim: set sw=4 ts=4 et: +# +# spec file for package python-pip +# +# 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/ +# -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} - -Name: python-progressbar -Version: 2.3 -Release: 0 -Summary: Text Progressbar Library for Python -Source: http://python-progressbar.googlecode.com/files/progressbar-%{version}.tar.gz -URL: http://code.google.com/p/python-progressbar/ -Group: Development/Libraries/Python -License: GNU Lesser General Public License version 3 or later (LGPL v3 or later) -BuildRoot: %{_tmppath}/build-%{name}-%{version} -BuildRequires: python python-devel python-setuptools -BuildRequires: gcc make glibc-devel pkgconfig -%if 0%{?suse_version} >= 1120 -BuildArch: noarch +Name: python-progressbar +Version: 2.3 +Release: 0 +License: LGPL-3.0+ +Summary: Text Progressbar Library for Python +Url: http://code.google.com/p/python-progressbar/ +Group: Development/Libraries/Python +Source: http://python-progressbar.googlecode.com/files/progressbar-%{version}.tar.gz +BuildRequires: python-devel +BuildRequires: python-distribute +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 -%py_requires %description This library provides a text mode progressbar. This is tipically used to @@ -25,24 +38,15 @@ display the progress of a long running operation, providing a visual clue that processing is underway. %prep -%setup -q -n "progressbar-%{version}" -find ./progressbar -type f -name '*.py' | while read py; do - %__perl -i -n -e 'print unless m,^#!, and $.==1' "$py" -done +%setup -q -n progressbar-%{version} %build -%__python ./setup.py build +python setup.py build %install -%__python ./setup.py install \ - --prefix="%{_prefix}" \ - --root="%{buildroot}" \ - --record-rpm=files.lst +python setup.py install --prefix="%{_prefix}" --root=%{buildroot} -%clean -%{?buildroot:%__rm -rf "%{buildroot}"} - -%files -f files.lst +%files %defattr(-,root,root) -%doc LICENSE.txt README.txt - +%doc LICENSE.txt README.txt examples.py +%{python_sitelib}/*