Restore Python3 compatibility

This commit is contained in:
Jamie Hall 2015-09-19 10:46:57 +10:00
parent 5ff0fcc693
commit 0bca4c8c3b

View File

@ -22,10 +22,10 @@ CURRENT_DIR = os.path.dirname(__file__)
# We can not import `xgboost.libpath` in setup.py directly since xgboost/__init__.py # We can not import `xgboost.libpath` in setup.py directly since xgboost/__init__.py
# import `xgboost.core` and finally will import `numpy` and `scipy` which are setup # import `xgboost.core` and finally will import `numpy` and `scipy` which are setup
# `install_requires`. That's why using `execfile` here. # `install_requires`. That's why we're using `exec` here.
libpath_py = os.path.join(CURRENT_DIR, 'xgboost/libpath.py') libpath_py = os.path.join(CURRENT_DIR, 'xgboost/libpath.py')
libpath = {'__file__': libpath_py} libpath = {'__file__': libpath_py}
execfile(libpath_py, libpath, libpath) exec(compile(open(libpath_py, "rb").read(), libpath_py, 'exec'), libpath, libpath)
LIB_PATH = libpath['find_lib_path']() LIB_PATH = libpath['find_lib_path']()
#print LIB_PATH #print LIB_PATH