make setup.py python 2/3 compatible

This commit is contained in:
2016-12-20 12:14:48 -05:00
parent 967638228a
commit 2bb430b91d
+7 -1
View File
@@ -7,8 +7,14 @@ import codecs
from setuptools import setup
try:
# Python 3
from os import dirname
except ImportError:
# Python 2
from os.path import dirname
here = os.path.abspath(os.dirname(__file__))
here = os.path.abspath(dirname(__file__))
def read(*parts):
return codecs.open(os.path.join(here, *parts), 'r').read()