Skip to content

Commit

Permalink
Add setuptools-68 to bv_python. (#19306) (#19308)
Browse files Browse the repository at this point in the history
Resolves issues with proper installation of Pygments, sphinxcontrib-applehelpe and sphinxcontrib-htmlhelp.
  • Loading branch information
biagas committed Feb 13, 2024
1 parent 1739be8 commit acb6d75
Showing 1 changed file with 59 additions and 53 deletions.
112 changes: 59 additions & 53 deletions src/tools/dev/scripts/bv_support/bv_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ function bv_python_info
export PYTHON_BUILD_DIR="Python-$PYTHON_VERSION"
export PYTHON_SHA256_CHECKSUM="504ce8cfd59addc04c22f590377c6be454ae7406cb1ebf6f5a350149225a9354"

export SETUPTOOLS_URL=""
export SETUPTOOLS_FILE="setuptools-68.0.0.tar.gz"
export SETUPTOOLS_BUILD_DIR="setuptools-68.0.0"
export SETUPTOOLS_SHA256_CHECKSUM=""

export PILLOW_URL=${PILLOW_URL:-"https://github.com/python-pillow/Pillow/archive/refs/tags/"}
export PILLOW_FILE="Pillow-10.0.0.tar.gz"
export PILLOW_BUILD_DIR="Pillow-10.0.0"
Expand Down Expand Up @@ -651,12 +656,64 @@ function build_python
return 1
fi

fix_py_permissions

cd "$START_DIR"
info "Done with Python"


# wheel and its dependencies
download_py_module ${FLITCORE_FILE} ${FLITCORE_URL}
if test $? -ne 0 ; then
return 1
fi

download_py_module ${WHEEL_FILE} ${WHEEL_URL}
if [[ $? != 0 ]] ; then
return 1
fi

extract_py_module ${FLITCORE_BUILD_DIR} ${FLITCORE_FILE} "flit_core"
if test $? -ne 0 ; then
return 1
fi

extract_py_module ${WHEEL_BUILD_DIR} ${WHEEL_FILE} "wheel"
if test $? -ne 0 ; then
return 1
fi

install_py_module ${FLITCORE_BUILD_DIR} "flit_core"
if test $? -ne 0 ; then
return 1
fi

install_py_module ${WHEEL_BUILD_DIR} "wheel"
if [[ $? != 0 ]] ; then
return 1
fi

# setuptools
# need the newest version required by a module, not the default
# version from python
download_py_module ${SETUPTOOLS_FILE} ${SETUPTOOLS_URL}
if test $? -ne 0 ; then
return 1
fi

extract_py_module ${SETUPTOOLS_BUILD_DIR} ${SETUPTOOLS_FILE} "setuptools"
if test $? -ne 0 ; then
return 1
fi

install_py_module ${SETUPTOOLS_BUILD_DIR} "setuptools"
if test $? -ne 0 ; then
return 1
fi

fix_py_permissions

info "Done with python setuptools module."
return 0

}

# *************************************************************************** #
Expand Down Expand Up @@ -990,46 +1047,6 @@ function build_mpi4py
return 0
}

# *************************************************************************** #
# build_wheel #
# *************************************************************************** #
function build_wheel
{
download_py_module ${FLITCORE_FILE} ${FLITCORE_URL}
if test $? -ne 0 ; then
return 1
fi

download_py_module ${WHEEL_FILE} ${WHEEL_URL}
if [[ $? != 0 ]] ; then
return 1
fi

extract_py_module ${FLITCORE_BUILD_DIR} ${FLITCORE_FILE} "flit_core"
if test $? -ne 0 ; then
return 1
fi

extract_py_module ${WHEEL_BUILD_DIR} ${WHEEL_FILE} "wheel"
if test $? -ne 0 ; then
return 1
fi

install_py_module ${FLITCORE_BUILD_DIR} "flit_core"
if test $? -ne 0 ; then
return 1
fi

install_py_module ${WHEEL_BUILD_DIR} "wheel"
if [[ $? != 0 ]] ; then
return 1
fi

fix_py_permissions

return 0
}

# *************************************************************************** #
# build_numpy #
# *************************************************************************** #
Expand Down Expand Up @@ -1581,17 +1598,6 @@ function bv_python_build
export PYHOME="${VISITDIR}/python/${PYTHON_VERSION}/${VISITARCH}"
export PYTHON_COMMAND="${PYHOME}/bin/python3"

# most every module needs wheel to build properly via pip
check_if_py_module_installed "wheel"
if [[ $? != 0 ]] ; then
info "Building the wheel module"
build_wheel
if [[ $? != 0 ]] ; then
error "wheel build failed. Bailing out."
fi
info "Done building the wheel module."
fi

check_if_py_module_installed "numpy"
if [[ $? != 0 ]] ; then
info "Building the numpy module"
Expand Down

0 comments on commit acb6d75

Please sign in to comment.