Skip to content

Commit

Permalink
Make tox work across versions of Python from 2.5 to 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo authored and wesm committed Jun 12, 2012
1 parent b26d0e2 commit f016133
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,14 @@
else:
FULLVERSION += QUALIFIER

def write_version_py(filename='pandas/version.py'):
def write_version_py(filename=None):
cnt = """\
version = '%s'
short_version = '%s'
"""
if not filename:
filename = os.path.join(os.path.dirname(__file__), 'pandas', 'version.py')

a = open(filename, 'w')
try:
a.write(cnt % (FULLVERSION, VERSION))
Expand Down
27 changes: 24 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,32 @@ envlist = py25, py26, py27, py31, py32

[testenv]
commands =
{envpython} setup.py clean
{envpython} setup.py build_ext --inplace
nosetests pandas
{envpython} setup.py clean build_ext install
{envbindir}/nosetests tests
rm -rf {toxinidir}/build {toxinidir}/tests
deps =
cython
numpy >= 1.6.1
nose
pytz

[testenv:py25]
changedir = .tox/py25/lib/python2.5/site-packages/pandas
deps =
cython
numpy >= 1.6.1
nose
pytz
simplejson

[testenv:py26]
changedir = .tox/py26/lib/python2.6/site-packages/pandas

[testenv:py27]
changedir = .tox/py27/lib/python2.7/site-packages/pandas

[testenv:py31]
changedir = .tox/py31/lib/python3.1/site-packages/pandas

[testenv:py32]
changedir = .tox/py32/lib/python3.2/site-packages/pandas

0 comments on commit f016133

Please sign in to comment.