forked from mirrors/nixpkgs
Fix xgboost python 2.7 build.
This commit is contained in:
parent
8b512b10c7
commit
94c61cee66
|
@ -30681,12 +30681,11 @@ EOF
|
||||||
propagatedBuildInputs = with self; [ scipy ];
|
propagatedBuildInputs = with self; [ scipy ];
|
||||||
buildInputs = with self; [ nose ];
|
buildInputs = with self; [ nose ];
|
||||||
|
|
||||||
# Cannot be installed with Python 2.x, most likely due to the patch below.
|
|
||||||
disabled = !isPy3k;
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
cd python-package
|
cd python-package
|
||||||
|
|
||||||
|
sed "s/CURRENT_DIR = os.path.dirname(__file__)/CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))/g" -i setup.py
|
||||||
|
sed "/^LIB_PATH.*/a LIB_PATH = [os.path.relpath(LIB_PATH[0], CURRENT_DIR)]" -i setup.py
|
||||||
cat <<EOF >xgboost/libpath.py
|
cat <<EOF >xgboost/libpath.py
|
||||||
def find_lib_path():
|
def find_lib_path():
|
||||||
return ["${pkgs.xgboost}/lib/libxgboost.so"]
|
return ["${pkgs.xgboost}/lib/libxgboost.so"]
|
||||||
|
|
Loading…
Reference in a new issue