Blob Blame History Raw
Name:           python-xlwt
Version:        0.7.4
Release:        5%{?dist}
Summary:        Spreadsheet python library

Group:          Development/Libraries
                # Utils.py is LPGL2.0+
License:        LGPLv2+ and BSD and BSD with advertising
URL:            http://pypi.python.org/pypi/xlwt
                # See also https://github.com/python-excel/xlwt
Source0:        http://pypi.python.org/packages/source/x/xlwt/xlwt-%{version}.tar.gz
                # https://github.com/python-excel/xlwt/issues/5
Patch0:         xlwt-fsf-address.patch
                # https://github.com/python-excel/xlwt/issues/4
Patch1:         xlwt-unbundle-antlr.patch
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  antlr-python

Requires:       python
Requires:       antlr-python


%description
A library for generating spreadsheet files that are compatible with
Excel 97/2000/XP/2003, OpenOffice.org Calc, and Gnumeric. xlwt has
full support for Unicode. Excel spreadsheets can be generated on any
platform without needing Excel or a COM server. The only requirement
is Python 2.3 to 2.7.


%prep
%setup -q -n xlwt-%{version}
%patch0 -p1
%patch1 -p1
sed -i '\;/usr/bin/env;d' xlwt/Formatting.py
iconv --from=ISO-8859-1 --to=UTF-8 licences.py > f.new && \
    touch -r licences.py f.new &&  mv f.new licences.py


%build
%{__python} setup.py --quiet build


%check
export PYTHONPATH=$(pwd)
%{__python} tests/RKbug.py 0
%{__python} tests/RKbug.py 1


%install
%{__python} setup.py --quiet install -O1 --skip-build --root %{buildroot}
mkdir tmp_docs
mv %{buildroot}%{python_sitelib}/xlwt/examples tmp_docs
mv %{buildroot}%{python_sitelib}/xlwt/doc tmp_docs


%files
%doc PKG-INFO README.html tmp_docs/* licences.py
%{python_sitelib}/xlwt
%{python_sitelib}/*.egg-info


%changelog
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu May 03 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
- Rewriting license according to legal advice.
- Adding %%check

* Thu May 03 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
- Tentative rewrite of License tag (blocked on FE_LEGAL)
- Unbundle antlr
- Explicit naming of files in %%{python_sitelib}

* Thu May 03 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
- Fixing bad License:
- Fixing license file encoding.

* Wed May 02 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
- Initial release