From 70aa4a2301e014344dff5fb2b761ece0852fbe79f1e7791c41b8f9601c147848 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 1 Feb 2012 08:59:41 +0000 Subject: [PATCH] Accepting request 102237 from devel:languages:python - Spec file cleanup: * Simplified macro usage * Removed outdated %clean section * Buildrequire python-distribute instead of setuptools OBS-URL: https://build.opensuse.org/request/show/102237 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-iniparse?expand=0&rev=11 --- python-iniparse.changes | 8 ++++++++ python-iniparse.spec | 39 ++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/python-iniparse.changes b/python-iniparse.changes index 9cfc71f..58bdd72 100644 --- a/python-iniparse.changes +++ b/python-iniparse.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 31 14:31:54 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Simplified macro usage + * Removed outdated %clean section + * Buildrequire python-distribute instead of setuptools + ------------------------------------------------------------------- Thu Sep 16 08:42:13 UTC 2010 - coolo@novell.com diff --git a/python-iniparse.spec b/python-iniparse.spec index abaa15c..801cbce 100644 --- a/python-iniparse.spec +++ b/python-iniparse.spec @@ -1,7 +1,7 @@ # -# spec file for package python-iniparse (Version 0.4) +# spec file for package python-iniparse # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 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,23 +15,21 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - - Name: python-iniparse -BuildRequires: python-setuptools Version: 0.4 -Release: 1 +Release: 0 Summary: Python Module for Accessing and Modifying Configuration Data in INI files -Group: Development/Libraries/Python License: MIT +Group: Development/Libraries/Python Url: http://code.google.com/p/iniparse/ Source0: http://iniparse.googlecode.com/files/iniparse-%{version}.tar.gz +BuildRequires: python-distribute BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if %suse_version > 1120 +%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 iniparse is an INI parser for Python which is API compatible with the @@ -41,23 +39,18 @@ are preserved when data is updated), and is more convenient to use. %prep %setup -q -n iniparse-%{version} - -%build -%{__python} setup.py build -# fixes chmod 644 html/index.html +%build +python setup.py build + %install -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix} --record-rpm=INSTALLED_FILES -# fixes -rm -rf $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} -grep -v "share/doc/iniparse-%{version}" INSTALLED_FILES > INSTALLED_FILES-nodoc +python setup.py install --root %{buildroot} --prefix=%{_prefix} +rm -rf %{buildroot}%{_datadir}/doc/iniparse-%{version} # Remove unwanted stuff -%clean -rm -rf $RPM_BUILD_ROOT - -%files -f INSTALLED_FILES-nodoc +%files %defattr(-,root,root,-) -%doc Changelog LICENSE LICENSE-PSF README html/index.html html/style.css +%doc Changelog LICENSE LICENSE-PSF README html/* +%{python_sitelib}/* %changelog