|
|
19acdea |
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
19acdea |
|
|
|
19acdea |
Name: python-xlrd
|
|
|
19acdea |
Version: 0.6.1
|
|
|
19acdea |
Release: 5%{?dist}
|
|
|
19acdea |
Summary: Library to extract data from Microsoft Excel (tm) spreadsheet files
|
|
|
19acdea |
|
|
|
19acdea |
Group: Development/Languages
|
|
|
19acdea |
License: BSD
|
|
|
19acdea |
URL: http://www.lexicon.net/sjmachin/xlrd.htm
|
|
|
19acdea |
Source0: http://www.lexicon.net/sjmachin/xlrd-%{version}.zip
|
|
|
19acdea |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
19acdea |
|
|
|
19acdea |
BuildArch: noarch
|
|
|
19acdea |
BuildRequires: python-devel, dos2unix
|
|
|
19acdea |
|
|
|
19acdea |
%description
|
|
|
19acdea |
Extract data from new and old Excel spreadsheets on any platform. Pure
|
|
|
19acdea |
Python (2.1 or later). Strong support for Excel dates. Unicode-aware.
|
|
|
19acdea |
|
|
|
19acdea |
%prep
|
|
|
19acdea |
%setup -q -n xlrd-%{version}
|
|
|
19acdea |
|
|
|
19acdea |
%build
|
|
|
19acdea |
# fix CRLF to LF
|
|
|
19acdea |
for i in */*.py *.html xlrd/doc/* xlrd/examples/*; do
|
|
|
19acdea |
dos2unix $i
|
|
|
19acdea |
done
|
|
|
19acdea |
for i in xlrd/doc/* xlrd/examples/xlrdnameAPIdemo.py; do
|
|
|
19acdea |
iconv -f iso8859-1 -t UTF-8 $i > $i.tmp
|
|
|
19acdea |
mv -f $i.tmp $i
|
|
|
19acdea |
done
|
|
|
19acdea |
%{__python} setup.py build
|
|
|
19acdea |
|
|
|
19acdea |
%install
|
|
|
19acdea |
rm -rf $RPM_BUILD_ROOT
|
|
|
19acdea |
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
19acdea |
# add shebang and remove .py file
|
|
|
19acdea |
(
|
|
|
19acdea |
echo '#!%{__python}'
|
|
|
19acdea |
cat $RPM_BUILD_ROOT%{_bindir}/runxlrd.py
|
|
|
19acdea |
) >> $RPM_BUILD_ROOT%{_bindir}/runxlrd
|
|
|
19acdea |
rm -rf $RPM_BUILD_ROOT%{_bindir}/runxlrd.py* \
|
|
|
19acdea |
$RPM_BUILD_ROOT/%{python_sitelib}/xlrd/doc \
|
|
|
19acdea |
$RPM_BUILD_ROOT/%{python_sitelib}/xlrd/examples
|
|
|
19acdea |
|
|
|
19acdea |
%clean
|
|
|
19acdea |
rm -rf $RPM_BUILD_ROOT
|
|
|
19acdea |
|
|
|
19acdea |
%files
|
|
|
19acdea |
%defattr(-,root,root,-)
|
|
|
19acdea |
%doc xlrd/doc/* xlrd/examples
|
|
|
19acdea |
%attr(755,root,root) %dir %{python_sitelib}/xlrd
|
|
|
19acdea |
%{python_sitelib}/xlrd/*
|
|
|
19acdea |
%if "%{fedora}" > "8"
|
|
|
19acdea |
%{python_sitelib}/*egg-info
|
|
|
19acdea |
%endif
|
|
|
19acdea |
%attr(755,root,root) %{_bindir}/*
|
|
|
19acdea |
|
|
|
19acdea |
%changelog
|
|
|
19acdea |
* Thu Jan 3 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-5
|
|
|
19acdea |
- updated /usr/bin/ by bindir macro
|
|
|
19acdea |
|
|
|
19acdea |
* Tue Jan 1 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-4
|
|
|
19acdea |
- added eggs for Fedora >= 9
|
|
|
19acdea |
|
|
|
19acdea |
* Fri Sep 14 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> 0.6.1-3
|
|
|
19acdea |
- doc files converted to UTF-8
|
|
|
19acdea |
- removed HISTORY.html README.html because they are also in xlrd/doc/
|
|
|
19acdea |
|
|
|
19acdea |
* Fri Sep 7 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 0.6.1-2
|
|
|
19acdea |
- namewithoutprefix removed, too complicated and not required
|
|
|
19acdea |
- added directory xlrd
|
|
|
19acdea |
- permissions for python scripts set to 644
|
|
|
19acdea |
- files converted from DOS line-feeds to UNIX format
|
|
|
19acdea |
- "#!/usr/bin/env python" added to beginning runxlrd script
|
|
|
19acdea |
- removed doc and examples from site-packages/xlrd directory
|
|
|
19acdea |
|
|
|
19acdea |
* Tue Jun 12 2007 Sean Reifschneider <jafo@tummy.com> - 0.6.1-1
|
|
|
19acdea |
- Initial RPM spec file.
|