From 53ba3d66113d1282b72d8b00f601f00fc655c42d Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 12 Mar 2019 17:36:48 +0700 Subject: [PATCH] Use packaged dbfpy Related to https://github.com/kennethreitz/tablib/issues/273 --- requirements.txt | 1 + setup.py | 1 + tablib/compat.py | 1 - tablib/formats/_dbf.py | 6 +++--- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index e00b8d86..88c9b72e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ pandas pyyaml xlrd xlwt +dbfpy diff --git a/setup.py b/setup.py index 4e65dd2e..c655e38a 100755 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ 'xlrd', 'xlwt', 'pyyaml', + 'dbfpy', ] diff --git a/tablib/compat.py b/tablib/compat.py index 660697d1..07c372de 100644 --- a/tablib/compat.py +++ b/tablib/compat.py @@ -32,7 +32,6 @@ from tablib.packages.statistics import median from itertools import izip_longest from backports import csv - import tablib.packages.dbfpy as dbfpy unicode = unicode xrange = xrange diff --git a/tablib/formats/_dbf.py b/tablib/formats/_dbf.py index 710797db..f159790b 100644 --- a/tablib/formats/_dbf.py +++ b/tablib/formats/_dbf.py @@ -16,9 +16,9 @@ from tablib.packages.dbfpy3 import record as dbfrecord import io else: - from tablib.packages.dbfpy import dbf - from tablib.packages.dbfpy import dbfnew - from tablib.packages.dbfpy import record as dbfrecord + from dbfpy import dbf + from dbfpy import dbfnew + from dbfpy import record as dbfrecord title = 'dbf'