8000 Test automatic build deps management with pip on Azure CI · scikit-learn/scikit-learn@2bc54a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2bc54a9

Browse files
committed
Test automatic build deps management with pip on Azure CI
1 parent 3a4fd5f commit 2bc54a9

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

build_tools/azure/install.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then
8888
# Since conda main channel usually lacks behind on the latest releases,
8989
# we use pypi to test against the latest releases of the dependencies.
9090
# conda is still used as a convenient way to install Python and pip.
91+
# We let pip install the latest version of the build dependencies from
92+
# pyproject.toml and the runtime dependencies from the dist-info metadata
93+
# that results from the scikit-learn setup.py file.
94+
# The optional test are installed separately:
9195
make_conda "python=$PYTHON_VERSION"
92-
python -m pip install numpy scipy joblib cython
96+
python -m pip install -U pip
9397
python -m pip install pytest==$PYTEST_VERSION pytest-cov pytest-xdist
9498
python -m pip install pandas matplotlib pyamg
9599
fi
@@ -117,5 +121,14 @@ except ImportError:
117121
print('pandas not installed')
118122
"
119123
python -m pip list
120-
python setup.py build_ext --inplace -j 3
121-
python setup.py develop
124+
125+
if [[ "$DISTRIB" == "conda-pip-latest" ]]; then
126+
# Check that pip can automatically install the build dependencies from
127+
# pyproject.toml using an isolated build environment:
128+
pip install --verbose --editable .
129+
else
130+
# Use the pre-installed build dependencies and build directly in the
131+
# current environment.
132+
python setup.py build_ext --inplace -j 3
133+
python setup.py develop
134+
fi

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ requires = [
44
"setuptools",
55
"wheel",
66
"numpy>=1.11",
7+
"scipy>=0.17.0",
78
# on conda, this is the latest for python 3.5
89
# The following places need to be in sync with regard to Cython version:
910
# - pyproject.toml

0 commit comments

Comments
 (0)
0