Make pip install xgboost*.tar.gz work by fixing build-python.sh (#5241)
* Make pip install xgboost*.tar.gz work by fixing build-python.sh * Simplify install doc * Add test * Install Miniconda for Linux target too * Build XGBoost only once in sdist * Try importing xgboost after installation * Don't set PYTHONPATH env var for sdist test
This commit is contained in:
committed by
GitHub
parent
cb3ed404cf
commit
4240daed4e
@@ -4,6 +4,18 @@ make -f dmlc-core/scripts/packages.mk lz4
|
||||
|
||||
source $HOME/miniconda/bin/activate
|
||||
|
||||
if [ ${TASK} == "python_sdist_test" ]; then
|
||||
set -e
|
||||
make pippack
|
||||
|
||||
conda activate python3
|
||||
python --version
|
||||
conda install numpy scipy
|
||||
|
||||
python -m pip install xgboost-*.tar.gz -v --user
|
||||
python -c 'import xgboost' || exit -1
|
||||
fi
|
||||
|
||||
if [ ${TASK} == "python_test" ]; then
|
||||
set -e
|
||||
# Build/test
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ${TASK} == "python_test" ]; then
|
||||
if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then
|
||||
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
|
||||
wget -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
|
||||
else
|
||||
echo "We are no longer running Linux test on Travis."
|
||||
exit 1
|
||||
wget -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
||||
fi
|
||||
bash conda.sh -b -p $HOME/miniconda
|
||||
source $HOME/miniconda/bin/activate
|
||||
|
||||
Reference in New Issue
Block a user