15
0

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
This commit is contained in:
Stephan Kulow
2012-02-01 08:59:41 +00:00
committed by Git OBS Bridge
parent 453939f817
commit 70aa4a2301
2 changed files with 24 additions and 23 deletions

View File

@@ -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

View File

@@ -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