99 description : ' build MDA docs'
1010 required : true
1111 default : false
12+ isolation :
13+ # Details on build isolation can be found here:
14+ # https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-isolation
15+ #
16+ # A short description of how this works in pratice is provided here:
17+ # * If build isolation is on, pip will create wheels for MDAnalysis in a
18+ # fully isolated temporary environment hence making sure that build
19+ # requirements are handled independently of the runtime environment
20+ # (whatever is already in your Python PATH at the time of install).
21+ # For example, with build isolation on, you could have an old version
22+ # of NumPy available in your current Python environment, but build with
23+ # a much newer one.
24+ # * If build isolation is off (through the --no-build-isolation flag), the
25+ # pip build system depends on what is currently avaiable in your Python
26+ # environment. So if NumPy is necessary and you have a version already
27+ # installed, it will just use that directly. There is a massive potential
28+ # for breaking an environment if misused, so this is very much advised
29+ # only in cases where you know exactly what your enviroment does / has
30+ # (such as the tests we run here).
31+ #
32+ # In practice we use build isolation in MDAnalysis CI when:
33+ # * We are trying to test MDAnalysis with a different / older runtime
34+ # version of a key build dependency (e.g. NumPy).
35+ # We don't use build isolation when:
36+ # * We know we have already installed the required dependencies earlier
37+ # and we want to make sure that we use those dependnecies for the build
38+ # (e.g. we want to check that the packages we pulled for conda-forge
39+ # work for the build, not the ones from PyPi).
40+ # * We want to test the build & runtime with a sepecial version of a
41+ # build dependency that won't get picked up by the pip install. For
42+ # example, when we use nightly wheels of NumPy.
43+ descriptions : ' Use build isolation for pip installs, if false `--no-build-isolation` is used. '
44+ required : true
45+ default : false
1246
1347
1448runs :
1953 run : |
2054 echo ${{ inputs.build-tests }}
2155 echo ${{ inputs.build-docs }}
56+ echo ${{ inputs.isolation }}
2257
2358 - name : check_setup
2459 shell : bash -l {0}
@@ -34,14 +69,20 @@ runs:
3469 - name : build_mda_main
3570 shell : bash -l {0}
3671 run : |
72+ if [ "${{ inputs.isolation }}" == "false" ]; then
73+ BUILD_FLAGS="--no-build-isolation"
74+ fi
3775 # install instead of develop would reduce coverage (for .pyx files)
38- cd package/ && python setup.py develop
76+ python -m pip install ${BUILD_FLAGS} -v -e ./package
3977
4078 - name : build_mda_tests
4179 if : ${{ inputs.build-tests == 'true' }}
4280 shell : bash -l {0}
4381 run : |
44- cd testsuite/ && python setup.py install
82+ if [ "${{ inputs.isolation }}" == "false" ]; then
83+ BUILD_FLAGS="--no-build-isolation"
84+ fi
85+ python -m pip install ${BUILD_FLAGS} -v -e ./testsuite
4586
4687 - name : build_docs
4788 if : ${{ inputs.build-docs == 'true' }}
0 commit comments