Make Python package installable.
This commit is contained in:
parent
e91bacd378
commit
c972feb4b5
0
wrapper/__init__.py
Normal file
0
wrapper/__init__.py
Normal file
28
wrapper/setup.py
Normal file
28
wrapper/setup.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
class XGBoostLibraryNotFound(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
if os.name == 'nt':
|
||||||
|
dll_path = os.path.join(cur_dir,
|
||||||
|
'../windows/x64/Release/xgboost_wrapper.dll')
|
||||||
|
else:
|
||||||
|
dll_path = os.path.join(cur_dir, 'libxgboostwrapper.so')
|
||||||
|
|
||||||
|
if not os.path.exists(dll_path):
|
||||||
|
raise XGBoostLibraryNotFound("XGBoost library not found. Did you run "
|
||||||
|
"../make?")
|
||||||
|
|
||||||
|
setup(name="xgboost",
|
||||||
|
version="0.32",
|
||||||
|
description="Python wrappers for XGBoost: eXtreme Gradient Boosting",
|
||||||
|
zip_safe=False,
|
||||||
|
py_modules=['xgboost'],
|
||||||
|
data_files=[dll_path],
|
||||||
|
url="https://github.com/dmlc/xgboost")
|
||||||
Loading…
x
Reference in New Issue
Block a user