Removed external dependencies, but utilize them if

available.
This commit is contained in:
Kenneth Reitz
2010-10-06 13:42:26 -04:00
parent ed686c2391
commit a54949bc08
4 changed files with 16 additions and 7 deletions
+7 -2
View File
@@ -15,6 +15,11 @@ if sys.argv[-1] == "publish":
publish()
sys.exit()
required = []
if sys.version_info < (2, 6):
required.append('simplejson')
setup(
name='tablib',
version='0.8.4',
@@ -24,8 +29,8 @@ setup(
author='Kenneth Reitz',
author_email='me@kennethreitz.com',
url='http://github.com/kennethreitz/tablib',
packages=['tablib', 'tablib.formats'],
install_requires=['xlwt', 'simplejson', 'PyYAML'],
packages=['tablib', 'tablib.formats', 'tablib.packages.yaml', 'tablib.packages.xlwt'],
install_requires=required,
license='MIT',
classifiers=(
'Development Status :: 5 - Production/Stable',
+2 -2
View File
@@ -4,9 +4,9 @@
"""
try:
import json
import json
except ImportError:
import simplejson as json
import simplejson as json
import tablib.core
+5 -1
View File
@@ -3,9 +3,13 @@
""" Tablib - XLS Support.
"""
import xlwt
import cStringIO
try:
import xlwt
except ImportError:
import tablib.packages.xlwt as xlwt
title = 'xls'
extentions = ('xls',)
+2 -2
View File
@@ -4,9 +4,9 @@
"""
try:
import yaml
import yaml
except ImportError:
import tablib.packages.yaml as yaml
import tablib.packages.yaml as yaml
import tablib