From 3845171dda87b23caeb3b48956e36224a69e738db845b9aba36c0e645176b6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 7 Mar 2019 10:11:57 +0000 Subject: [PATCH] Accepting request 682351 from home:jayvdb:coala:python3-bears - Add openpyxl-usage-fix.patch to workaround incompatibility with current releases of openpyxl - Add HISTORY.rst to %doc - Add minimum versions of dependencies from upstream - Use %license - Update to v0.12.1 - Add Pandas DataFrame support OBS-URL: https://build.opensuse.org/request/show/682351 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tablib?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + openpyxl-usage-fix.patch | 23 ++++++++++ python-tablib.changes | 64 ++++++++++++++++++++++++++++ python-tablib.spec | 90 ++++++++++++++++++++++++++++++++++++++++ tablib-0.12.1.tar.gz | 3 ++ 6 files changed, 204 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 openpyxl-usage-fix.patch create mode 100644 python-tablib.changes create mode 100644 python-tablib.spec create mode 100644 tablib-0.12.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/openpyxl-usage-fix.patch b/openpyxl-usage-fix.patch new file mode 100644 index 0000000..cf7f299 --- /dev/null +++ b/openpyxl-usage-fix.patch @@ -0,0 +1,23 @@ +From ac3cf67620c89f71b73bed891355e8dc0491a541 Mon Sep 17 00:00:00 2001 +From: Gregory Bataille +Date: Wed, 12 Sep 2018 13:34:55 +0200 +Subject: [PATCH] fix(): remove openpyxl warning by properly accessing cells + (#296) + +--- + tablib/formats/_xlsx.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tablib/formats/_xlsx.py b/tablib/formats/_xlsx.py +index 20f55df..eb921f9 100644 +--- a/tablib/formats/_xlsx.py ++++ b/tablib/formats/_xlsx.py +@@ -119,7 +119,7 @@ def dset_sheet(dataset, ws, freeze_panes=True): + row_number = i + 1 + for j, col in enumerate(row): + col_idx = get_column_letter(j + 1) +- cell = ws.cell('%s%s' % (col_idx, row_number)) ++ cell = ws['%s%s' % (col_idx, row_number)] + + # bold headers + if (row_number == 1) and dataset.headers: diff --git a/python-tablib.changes b/python-tablib.changes new file mode 100644 index 0000000..12c5868 --- /dev/null +++ b/python-tablib.changes @@ -0,0 +1,64 @@ +------------------------------------------------------------------- +Thu Mar 7 06:40:43 UTC 2019 - John Vandenberg + +- Add openpyxl-usage-fix.patch to workaround incompatibility with + current releases of openpyxl +- Add HISTORY.rst to %doc +- Add minimum versions of dependencies from upstream +- Use %license +- Update to v0.12.1 + - Add Pandas DataFrame support + +------------------------------------------------------------------- +Thu Aug 24 05:12:52 UTC 2017 - tbechtold@suse.com + +- update to 0.11.5: + - Use ``yaml.safe_load`` for importing yaml. + - Use built-in `json` package if available + - Support Python 3.5+ in classifiers + - Fixed textual representation for Dataset with no headers + - Handle decimal types + - Release fix. + - Fix export only formats. + - Fix for xlsx output. + - Fixed packaging error on Python 3. + - Added LaTeX table export format (``Dataset.latex``). + - Support for dBase (DBF) files (``Dataset.dbf``). + - New import/export interface (``Dataset.export()``, ``Dataset.load()``). + - CSV custom delimiter support (``Dataset.export('csv', delimiter='$')``). + - Adding ability to remove duplicates to all rows in a dataset (``Dataset.remove_duplicates()``). + - Added a mechanism to avoid ``datetime.datetime`` issues when serializing data. + - New ``detect_format()`` function (mostly for internal use). + - Update the vendored unicodecsv to fix ``None`` handling. + - Only freeze the headers row, not the headers columns (xls). + - ``detect()`` function removed. + - Fix XLSX import. + - Bugfix for ``Dataset.transpose().transpose()``. +- convert to singlespec + +------------------------------------------------------------------- +Fri Jul 24 21:47:30 UTC 2015 - seife+obs@b1-systems.com + +- fix RHEL build by ignoring bytecompile-errors + +------------------------------------------------------------------- +Thu May 14 09:25:23 UTC 2015 - benoit.monin@gmx.fr + +- update to version 0.10.0: + * Unicode Column Headers + * ALL the bugfixes! +- add fdupes as BuildRequires and call it after install +- remove shebang in every python files +- remove useless CFLAGS declaration +- run the tests during build with test_tablib.py + +------------------------------------------------------------------- +Thu Oct 24 11:15:40 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Fri Jul 27 10:36:10 UTC 2012 - saschpe@suse.de + +- Initial version + diff --git a/python-tablib.spec b/python-tablib.spec new file mode 100644 index 0000000..cb3d2c4 --- /dev/null +++ b/python-tablib.spec @@ -0,0 +1,90 @@ +# +# spec file for package python-tablib +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%if 0%{?rhel} +# I get syntax errors in the brp-python-bytecompile step... +%define _python_bytecompile_errors_terminate_build 0 +%endif + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-tablib +Version: 0.12.1 +Release: 0 +Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV) +License: MIT +Group: Development/Languages/Python +Url: http://python-tablib.org +Source: https://files.pythonhosted.org/packages/source/t/tablib/tablib-%{version}.tar.gz +Patch0: openpyxl-usage-fix.patch +BuildRequires: %{python_module PyYAML >= 3.12} +BuildRequires: %{python_module odfpy >= 1.3.5} +BuildRequires: %{python_module openpyxl >= 2.4.8} +BuildRequires: %{python_module pandas >= 0.20.3} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module unicodecsv >= 0.14.1} +BuildRequires: %{python_module xlrd >= 1.1.0} +BuildRequires: %{python_module xlwt >= 1.3.0} +BuildRequires: %{python_module xml} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-PyYAML >= 3.12 +Requires: python-odfpy >= 1.3.5 +Requires: python-openpyxl >= 2.4.8 +Requires: python-unicodecsv >= 0.14.1 +Requires: python-xlrd >= 1.1.0 +Requires: python-xlwt >= 1.3.0 +Requires: python-xml +Suggests: python-pandas >= 0.20.3 +BuildArch: noarch + +%python_subpackages + +%description +Tablib is a format-agnostic tabular dataset library, written in Python. + +Output formats supported: + +- Excel (Sets + Books) +- JSON (Sets + Books) +- YAML (Sets + Books) +- HTML (Sets) +- TSV (Sets) +- CSV (Sets) + +%prep +%setup -q -n tablib-%{version} +%patch0 -p1 +# Remove shebang lines from non-executable scripts: +find tablib -name "*.py" | xargs sed -i '1 { /^#!/ d }' + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec test_tablib.py + +%files %{python_files} +%license LICENSE +%doc README.rst HISTORY.rst +%{python_sitelib}/* + +%changelog diff --git a/tablib-0.12.1.tar.gz b/tablib-0.12.1.tar.gz new file mode 100644 index 0000000..8a10424 --- /dev/null +++ b/tablib-0.12.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8cf50a61d66655229993f2ee29220553fb2c80403479f8e6de77c0c24649d87 +size 63420