Commit a38da01f authored by André Anjos's avatar André Anjos 💬

[python3] Use six module for py2/3 compatibility

parent 6375bfed
......@@ -9,6 +9,8 @@ probing.
import os
import re
import sys
import six
import hashlib
import random
......@@ -186,7 +188,7 @@ def qsub(command, queue=None, cwd=True, name=None, deps=[], stdout='',
if array is not None:
scmd.append('-t')
if isinstance(array, (str, unicode)):
if isinstance(array, six.string_types):
try:
i = int(array)
scmd.append('1-%d:1' % i)
......
......@@ -3,9 +3,9 @@ from setuptools import setup, find_packages
import sys
# If Python < 2.7 or 3.0 <= Python < 3.2, require some more stuff
ARGPARSE = []
DEPS = ['six']
if sys.version_info[:2] < (2, 7) or ((3,0) <= sys.version_info[:2] < (3,2)):
ARGPARSE.append('argparse')
DEPS.append('argparse')
setup(
name='gridtk',
......@@ -40,7 +40,7 @@ setup(
long_description=open('README.rst').read(),
install_requires=ARGPARSE,
install_requires=DEPS,
classifiers = [
'Development Status :: 4 - Beta',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment