diff --git a/python-xlwt.spec b/python-xlwt.spec index 1655a97..7b9fb89 100644 --- a/python-xlwt.spec +++ b/python-xlwt.spec @@ -1,7 +1,9 @@ +%global sum Spreadsheet python library + Name: python-xlwt Version: 1.0.0 -Release: 1%{?dist} -Summary: Spreadsheet python library +Release: 2%{?dist} +Summary: %{sum} Group: Development/Libraries # Utils.py is LPGL2.0+ @@ -12,15 +14,13 @@ Source0: http://pypi.python.org/packages/source/x/xlwt/xlwt-%{version}.ta BuildArch: noarch BuildRequires: python2-devel +BuildRequires: python3-devel BuildRequires: python-setuptools BuildRequires: antlr-python Requires: python Requires: antlr-python - # https://github.com/python-excel/xlwt/issues/73 -Provides: bundled(antlr) = 2.7.7 - %description A library for generating spreadsheet files that are compatible with @@ -30,34 +30,82 @@ platform without needing Excel or a COM server. The only requirement is Python 2.3 to 2.7. +%package -n python2-xlwt +Summary: %{sum} +Provides: python-xlwt = %{version}-%{release} +Obsoletes: python-xlwt <= 0.7.4 +Provides: bundled(antlr) = 2.7.7 +%{?python_provide:%python_provide python2-xlwt} + +%description -n python2-xlwt +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. + + +%package -n python3-xlwt +Summary: %{sum} +Provides: bundled(antlr) = 2.7.7 +%{?python_provide:%python_provide python3-xlwt} + +%description -n python3-xlwt +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} sed -i '\;/usr/bin/env;d' xlwt/Formatting.py +cd examples +for file in \ + panes2.py numbers_demo.py zoom_magnification.py image_chg_col_wid.py +do + sed "s|\r||g" $file > $file.new && \ + touch -r $file $file.new && \ + mv $file.new $file +done %build -%{__python} setup.py --quiet build +%py2_build +%py3_build %check cd tests -PYTHONPATH=.. python -m unittest discover +PYTHONPATH=.. %{__python2} -m unittest discover +PYTHONPATH=.. %{__python3} -m unittest discover %install -%{__python} setup.py --quiet install -O1 --skip-build --root %{buildroot} +%py2_install +%py3_install mkdir tmp_docs cp -ar examples docs tmp_docs -%files +%files -n python2-xlwt %license docs/licenses.rst %doc PKG-INFO README.rst tmp_docs/* -%{python_sitelib}/xlwt -%{python_sitelib}/*.egg-info +%{python2_sitelib}/xlwt +%{python2_sitelib}/*.egg-info + +%files -n python3-xlwt +%license docs/licenses.rst +%doc PKG-INFO README.rst tmp_docs/* +%{python3_sitelib}/xlwt +%{python3_sitelib}/*.egg-info %changelog +* Mon Jan 04 2016 Alec Leamas - 1.0.0-2 +- Add python3 subpackage + * Mon Jan 04 2016 Alec Leamas - 1.0.0-1 - Updating to new upstream. - Remove upstreamed patch xlwt-fsf-address.