forked from python-excel/xlrd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
20 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ build/ | |
/.tox | ||
/*.xml | ||
/htmlcov | ||
MANIFEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include README.html | ||
recursive-include tests *.py *.xls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,51 +4,45 @@ | |
import sys | ||
python_version = sys.version_info[:2] | ||
|
||
if python_version < (2, 6): | ||
raise Exception("This version of xlrd requires Python 2.6 or above. " | ||
"For older versions of Python, you can use the 0.8 series.") | ||
|
||
av = sys.argv | ||
if len(av) > 1 and av[1].lower() == "--egg": | ||
if python_version < (2, 3): | ||
raise Exception("Can't lay eggs with Python version %d.%d " % python_version) | ||
del av[1] | ||
from setuptools import setup | ||
else: | ||
from distutils.core import setup | ||
|
||
the_url = 'http://www.lexicon.net/sjmachin/xlrd.htm' | ||
|
||
# Get version number without importing xlrd/__init__ | ||
# (this horrificness is needed while using 2to3 for | ||
# python 3 compatibility, it should go away once | ||
# we stop using that.) | ||
sys.path.insert(0, path.join(path.dirname(__file__), 'xlrd')) | ||
from info import __VERSION__ | ||
sys.path.pop(0) | ||
|
||
def mkargs(**kwargs): | ||
return kwargs | ||
from xlrd.info import __VERSION__ | ||
|
||
args = mkargs( | ||
setup( | ||
name = 'xlrd', | ||
version = __VERSION__, | ||
author = 'John Machin', | ||
author_email = '[email protected]', | ||
url = the_url, | ||
url = 'http://www.python-excel.org/', | ||
packages = ['xlrd'], | ||
scripts = [ | ||
'scripts/runxlrd.py', | ||
], | ||
package_data={ | ||
'xlrd': [ | ||
'doc/*.htm*', | ||
# 'doc/*.txt', | ||
'examples/*.*', | ||
], | ||
|
||
}, | ||
description = 'Library for developers to extract data from Microsoft Excel (tm) spreadsheet files', | ||
long_description = \ | ||
"Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on any platform. " \ | ||
"Pure Python (2.6, 2.7, 3.2+). Strong support for Excel dates. Unicode-aware.", | ||
platforms = ["Any platform -- don't need Windows"], | ||
license = 'BSD', | ||
keywords = ['xls', 'excel', 'spreadsheet', 'workbook'], | ||
) | ||
|
||
if python_version >= (2, 3): | ||
args23 = mkargs( | ||
download_url = the_url, | ||
classifiers = [ | ||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
|
@@ -60,20 +54,4 @@ def mkargs(**kwargs): | |
'Topic :: Office/Business', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
) | ||
args.update(args23) | ||
|
||
if python_version >= (2, 4): | ||
args24 = mkargs( | ||
package_data={ | ||
'xlrd': [ | ||
'doc/*.htm*', | ||
# 'doc/*.txt', | ||
'examples/*.*', | ||
], | ||
|
||
}, | ||
) | ||
args.update(args24) | ||
|
||
setup(**args) | ||
) |