Alec Leamas d722cb7
Name:           python-xlwt
Alec Leamas d722cb7
Version:        0.7.4
c1c5794
Release:        2%{?dist}
Alec Leamas d722cb7
Summary:        Spreadsheet python library
Alec Leamas d722cb7
Alec Leamas d722cb7
Group:          Development/Libraries
Alec Leamas d722cb7
                # Utils.py is LPGL2.0+
Alec Leamas d722cb7
License:        LGPLv2+ and BSD and BSD with advertising
Alec Leamas d722cb7
URL:            http://pypi.python.org/pypi/xlwt
Alec Leamas d722cb7
                # See also https://github.com/python-excel/xlwt
Alec Leamas d722cb7
Source0:        http://pypi.python.org/packages/source/x/xlwt/xlwt-%{version}.tar.gz
Alec Leamas d722cb7
                # https://github.com/python-excel/xlwt/issues/5
Alec Leamas d722cb7
Patch0:         xlwt-fsf-address.patch
Alec Leamas d722cb7
                # https://github.com/python-excel/xlwt/issues/4
Alec Leamas d722cb7
Patch1:         xlwt-unbundle-antlr.patch
Alec Leamas d722cb7
BuildArch:      noarch
Alec Leamas d722cb7
Alec Leamas d722cb7
BuildRequires:  python2-devel
Alec Leamas d722cb7
BuildRequires:  python-setuptools
Alec Leamas d722cb7
BuildRequires:  antlr-python
Alec Leamas d722cb7
Alec Leamas d722cb7
Requires:       python
Alec Leamas d722cb7
Requires:       antlr-python
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%description
Alec Leamas d722cb7
A library for generating spreadsheet files that are compatible with
Alec Leamas d722cb7
Excel 97/2000/XP/2003, OpenOffice.org Calc, and Gnumeric. xlwt has
Alec Leamas d722cb7
full support for Unicode. Excel spreadsheets can be generated on any
Alec Leamas d722cb7
platform without needing Excel or a COM server. The only requirement
Alec Leamas d722cb7
is Python 2.3 to 2.7.
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%prep
Alec Leamas d722cb7
%setup -q -n xlwt-%{version}
Alec Leamas d722cb7
%patch0 -p1
Alec Leamas d722cb7
%patch1 -p1
Alec Leamas d722cb7
sed -i '\;/usr/bin/env;d' xlwt/Formatting.py
Alec Leamas d722cb7
iconv --from=ISO-8859-1 --to=UTF-8 licences.py > f.new && \
Alec Leamas d722cb7
    touch -r licences.py f.new &&  mv f.new licences.py
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%build
Alec Leamas d722cb7
%{__python} setup.py --quiet build
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%check
Alec Leamas d722cb7
export PYTHONPATH=$(pwd)
Alec Leamas d722cb7
%{__python} tests/RKbug.py 0
Alec Leamas d722cb7
%{__python} tests/RKbug.py 1
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%install
Alec Leamas d722cb7
%{__python} setup.py --quiet install -O1 --skip-build --root %{buildroot}
Alec Leamas d722cb7
mkdir tmp_docs
Alec Leamas d722cb7
mv %{buildroot}%{python_sitelib}/xlwt/examples tmp_docs
Alec Leamas d722cb7
mv %{buildroot}%{python_sitelib}/xlwt/doc tmp_docs
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%files
Alec Leamas d722cb7
%doc PKG-INFO README.html tmp_docs/* licences.py
Alec Leamas d722cb7
%{python_sitelib}/xlwt
Alec Leamas d722cb7
%{python_sitelib}/*.egg-info
Alec Leamas d722cb7
Alec Leamas d722cb7
Alec Leamas d722cb7
%changelog
c1c5794
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-2
c1c5794
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c1c5794
Alec Leamas d722cb7
* Thu May 03 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
Alec Leamas d722cb7
- Rewriting license according to legal advice.
Alec Leamas d722cb7
- Adding %%check
Alec Leamas d722cb7
Alec Leamas d722cb7
* Thu May 03 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
Alec Leamas d722cb7
- Tentative rewrite of License tag (blocked on FE_LEGAL)
Alec Leamas d722cb7
- Unbundle antlr
Alec Leamas d722cb7
- Explicit naming of files in %%{python_sitelib}
Alec Leamas d722cb7
Alec Leamas d722cb7
* Thu May 03 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
Alec Leamas d722cb7
- Fixing bad License:
Alec Leamas d722cb7
- Fixing license file encoding.
Alec Leamas d722cb7
Alec Leamas d722cb7
* Wed May 02 2012 Alec Leamas <leamas.alec@gmail.com> - 0.7.4-1
Alec Leamas d722cb7
- Initial release