Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions build_tools/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ pre_python_environment_install() {

}

check_packages_dev_version() {
for package in $@; do
package_version=$(python -c "import $package; print($package.__version__)")
if ! [[ $package_version =~ "dev" ]]; then
echo "$package is not a development version: $package_version"
exit 1
fi
done
}

python_environment_install_and_activate() {
if [[ "$DISTRIB" == "conda"* ]]; then
# Install/update conda with the libmamba solver because the legacy
Expand All @@ -71,12 +81,10 @@ python_environment_install_and_activate() {
if [[ "$DISTRIB" == "conda-pip-scipy-dev" ]]; then
echo "Installing development dependency wheels"
dev_anaconda_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy pandas scipy
dev_packages="numpy scipy pandas"
pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url $dev_packages

# XXX: at the time of writing, installing scipy or pandas from the dev
# wheels forces the numpy dependency to be < 2.0.0. Let's force the
# installation of numpy dev wheels instead.
pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy
check_packages_dev_version $dev_packages

echo "Installing Cython from latest sources"
pip install https://github.com/cython/cython/archive/master.zip
Expand Down