forked from pool/python-tablib
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
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
23
openpyxl-usage-fix.patch
Normal file
23
openpyxl-usage-fix.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From ac3cf67620c89f71b73bed891355e8dc0491a541 Mon Sep 17 00:00:00 2001
|
||||
From: Gregory Bataille <gregory.bataille@gmail.com>
|
||||
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:
|
64
python-tablib.changes
Normal file
64
python-tablib.changes
Normal file
@@ -0,0 +1,64 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 7 06:40:43 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- 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
|
||||
|
90
python-tablib.spec
Normal file
90
python-tablib.spec
Normal file
@@ -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
|
3
tablib-0.12.1.tar.gz
Normal file
3
tablib-0.12.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b8cf50a61d66655229993f2ee29220553fb2c80403479f8e6de77c0c24649d87
|
||||
size 63420
|
Reference in New Issue
Block a user