Unverified Commit 5fe84f8f authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] make it possible to build wheels without internet connection (fixes #5979) (#6042)

parent c60bc739
......@@ -48,6 +48,9 @@
# Compile with MinGW.
# --mpi
# Compile MPI version.
# --no-isolation
# Assume all build and install dependencies are already installed,
# don't go to the internet to get them.
# --nomp
# Compile version without OpenMP support.
# --precompile
......@@ -159,6 +162,10 @@ while [ $# -gt 0 ]; do
--mpi)
BUILD_ARGS="${BUILD_ARGS} --config-setting=cmake.define.USE_MPI=ON"
;;
--no-isolation)
BUILD_ARGS="${BUILD_ARGS} --no-isolation"
PIP_INSTALL_ARGS="${PIP_INSTALL_ARGS} --no-build-isolation"
;;
--nomp)
BUILD_ARGS="${BUILD_ARGS} --config-setting=cmake.define.USE_OPENMP=OFF"
;;
......@@ -337,6 +344,7 @@ if test "${BUILD_SDIST}" = true; then
python -m build \
--sdist \
--outdir ../dist \
${BUILD_ARGS} \
.
fi
......
......@@ -256,7 +256,14 @@ If you get any errors during installation or due to any other reasons, you may w
Build Wheel File
****************
You can use ``sh ./build-python.sh install bdist_wheel`` instead of ``sh ./build-python.sh install`` to build wheel file and use it for installation later. This might be useful for systems with restricted or completely without network access.
You can use ``sh ./build-python.sh install bdist_wheel`` to build a wheel file but not install it.
That script requires some dependencies like ``build``, ``scikit-build-core``, and ``wheel``.
In environments with restricted or no internt access, install those tools and then pass ``--no-isolation``.
.. code:: sh
sh ./build-pythoon.sh bdist_wheel --no-isolation
Build With MSBuild
******************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment