Tim Lauridsen 8f7cb9
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
Name:           python-iniparse
Tim Lauridsen b4e070
Version:        0.2.3
Tim Lauridsen a7e938
Release:        4%{?dist}
Tim Lauridsen 8f7cb9
Summary:        Python Module for Accessing and Modifying Configuration Data in INI files
Tim Lauridsen 8f7cb9
Group:          Development/Libraries
Tim Lauridsen 8f7cb9
License:        MIT
Tim Lauridsen 8f7cb9
URL:            http://code.google.com/p/iniparse/
Tim Lauridsen 8f7cb9
Source0:        http://iniparse.googlecode.com/files/iniparse-%{version}.tar.gz
Tim Lauridsen 8f7cb9
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Tim Lauridsen 8f7cb9
Tim Lauridsen 1a8b9e
%if 0%{?fedora} >= 8
Tim Lauridsen 7decab
BuildRequires: python-setuptools-devel
Tim Lauridsen 1a8b9e
%else
Tim Lauridsen 1a8b9e
BuildRequires: python-setuptools
Tim Lauridsen 1a8b9e
%endif
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
BuildArch: noarch
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%description
Tim Lauridsen 8f7cb9
iniparse is an INI parser for Python which is API compatible
Tim Lauridsen 8f7cb9
with the standard library's ConfigParser, preserves structure of INI
Tim Lauridsen 8f7cb9
files (order of sections & options, indentation, comments, and blank
Tim Lauridsen 8f7cb9
lines are preserved when data is updated), and is more convenient to
Tim Lauridsen 8f7cb9
use.
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%prep
Tim Lauridsen 8f7cb9
%setup -q -n iniparse-%{version}
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%build
Tim Lauridsen 8f7cb9
%{__python} setup.py build
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%install
Tim Lauridsen 8f7cb9
rm -rf $RPM_BUILD_ROOT
Tim Lauridsen 8f7cb9
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
Tim Lauridsen 8f7cb9
# fixes
Tim Lauridsen 8f7cb9
chmod 644 $RPM_BUILD_ROOT//usr/share/doc/iniparse-%{version}/index.html
Tim Lauridsen 8f7cb9
mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT/usr/share/doc/python-iniparse-%{version}
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%clean
Tim Lauridsen 8f7cb9
rm -rf $RPM_BUILD_ROOT
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%files
Tim Lauridsen 8f7cb9
%defattr(-,root,root,-)
Tim Lauridsen a7e938
%dir %{_docdir}/python-iniparse-%{version} 
Tim Lauridsen a7e938
%doc %{_docdir}/python-iniparse-%{version}/*
Tim Lauridsen f2700a
%{python_sitelib}/*
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%changelog
Tim Lauridsen 7decab
Tim Lauridsen a7e938
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
Tim Lauridsen a7e938
- own the %%{_docdir}/python-iniparse-%{version} directory
Tim Lauridsen f2700a
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
Tim Lauridsen f2700a
- handle egg-info too
Tim Lauridsen d74f2a
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
Tim Lauridsen d74f2a
- removed patch source line
Tim Lauridsen b4e070
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-1
Tim Lauridsen b4e070
- Updates to release 0.2.3
Tim Lauridsen b4e070
- removed empty ini file patch, it is included in 0.2.3
Tim Lauridsen 048ab3
* Mon Nov 19 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-2
Tim Lauridsen 048ab3
- Added upstream patch to fix problems with empty ini files.
Tim Lauridsen 855356
* Tue Sep 25 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-1
Tim Lauridsen 855356
- Updated to release 0.2.2
Tim Lauridsen 855356
- removed patch to to fix problems with out commented lines, included in upstream source
Tim Lauridsen 1a8b9e
* Wed Sep 12 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-4
Tim Lauridsen 1a8b9e
- Added some logic to get the right python-setuptools buildrequeres
Tim Lauridsen 1a8b9e
- based on the fedora version, to make the same spec file useful in
Tim Lauridsen 1a8b9e
- all fedora releases.
Tim Lauridsen ddc9e8
* Mon Sep 10 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-3
Tim Lauridsen ddc9e8
- Added patch from upstream svn to fix problems with out commented lines.
Tim Lauridsen 7decab
* Tue Aug 28 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-2
Tim Lauridsen 7decab
- Changed BuildRequires python-setuptools to python-setuptools-devel
Tim Lauridsen 8e3e66
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
Tim Lauridsen 8e3e66
- Release 0.2.1
Tim Lauridsen 8f7cb9
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
Tim Lauridsen 8f7cb9
- relocated doc to %{_docdir}/python-iniparse-%{version}
Tim Lauridsen 8f7cb9
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
Tim Lauridsen 8f7cb9
- changed name from iniparse to python-iniparse
Tim Lauridsen 8f7cb9
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
Tim Lauridsen 8f7cb9
- Release 0.2
Tim Lauridsen 8f7cb9
- Added html/* to %%doc
Tim Lauridsen 8f7cb9
* Fri Jul 13 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.1-1
Tim Lauridsen 8f7cb9
- Initial build.