Skip to content

Commit

Permalink
Add comments on build isolation use
Browse files Browse the repository at this point in the history
  • Loading branch information
IAlibay committed Aug 15, 2023
1 parent 2bd32ca commit a33cbd9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/actions/build-src/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,37 @@ inputs:
required: true
default: false
isolation:
descriptions: 'use build isolation for pip installs'
# Details on build isolation can be found here:
# https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-isolation
#
# A short description of how this works in pratice is provided here:
# * If build isolation is on, pip will create wheels for MDAnalysis in a
# fully isolated temporary environment hence making sure that build
# requirements are handled independently of the runtime environment
# (whatever is already in your Python PATH at the time of install).
# For example, with build isolation on, you could have an old version
# of NumPy available in your current Python environment, but build with
# a much newer one.
# * If build isolation is off (through the --no-build-isolation flag), the
# pip build system depends on what is currently avaiable in your Python
# environment. So if NumPy is necessary and you have a version already
# installed, it will just use that directly. There is a massive potential
# for breaking an environment if misused, so this is very much advised
# only in cases where you know exactly what your enviroment does / has
# (such as the tests we run here).
#
# In practice we use build isolation in MDAnalysis CI when:
# * We are trying to test MDAnalysis with a different / older runtime
# version of a key build dependency (e.g. NumPy).
# We don't use build isolation when:
# * We know we have already installed the required dependencies earlier
# and we want to make sure that we use those dependnecies for the build
# (e.g. we want to check that the packages we pulled for conda-forge
# work for the build, not the ones from PyPi).
# * We want to test the build & runtime with a sepecial version of a
# build dependency that won't get picked up by the pip install. For
# example, when we use nightly wheels of NumPy.
descriptions: 'Use build isolation for pip installs, if false `--no-build-isolation` is used. '
required: true
default: false

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ jobs:
with:
build-tests: true
build-docs: false
# If we specifically define an old NumPy version then we isolate the
# the build, i.e. make sure that we build with NumPy 1.25+ but we keep
# the old version of NumPy as what we use for runtime testing
isolation: ${{ matrix.numpy != '' }}

- name: check_deps
Expand Down

0 comments on commit a33cbd9

Please sign in to comment.