From e1b98cfdf74d010c8bad8b85b3a5042ed9ec4fba Mon Sep 17 00:00:00 2001 From: Althea Denlinger Date: Tue, 17 Sep 2024 15:39:17 -0700 Subject: [PATCH 1/2] Add flags to `pip install` in docs --- docs/developers_guide/quick_start.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developers_guide/quick_start.md b/docs/developers_guide/quick_start.md index 4c559318b..97f817606 100644 --- a/docs/developers_guide/quick_start.md +++ b/docs/developers_guide/quick_start.md @@ -379,7 +379,7 @@ With the conda environment activated, you can switch branches and update just the `polaris` package with: ```bash -python -m pip install -e . +python -m pip install --no-deps --no-build-isolation -e . ``` The activation script will do this automatically when you source it in @@ -444,7 +444,7 @@ With the conda environment activated, you can switch branches and update just the `polaris` package with: ```bash -python -m pip install -e . +python -m pip install --no-deps --no-build-isolation -e . ``` This will be substantially faster than rerunning From 9088c0f81be713b8f956f451ffbfcfd852a0f084 Mon Sep 17 00:00:00 2001 From: Althea Denlinger Date: Tue, 24 Sep 2024 08:26:18 -0700 Subject: [PATCH 2/2] Add `pip install` flags to deployment --- configure_polaris_envs.py | 2 +- deploy/bootstrap.py | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/configure_polaris_envs.py b/configure_polaris_envs.py index 6d9b5ae79..45f50b4f3 100755 --- a/configure_polaris_envs.py +++ b/configure_polaris_envs.py @@ -71,7 +71,7 @@ def main(): f'git@github.com:{args.mache_fork}.git mache && ' \ f'cd mache && ' \ f'conda install -y --file spec-file.txt && ' \ - f'python -m pip install --no-deps .' + f'python -m pip install --no-deps --no-build-isolation .' check_call(commands, logger=logger) diff --git a/deploy/bootstrap.py b/deploy/bootstrap.py index 8bdda7cee..61d0c837a 100755 --- a/deploy/bootstrap.py +++ b/deploy/bootstrap.py @@ -143,12 +143,13 @@ def main(): # noqa: C901 if options['local_mache']: print('Install local mache\n') - commands = f'source {conda_base}/etc/profile.d/conda.sh && ' \ - f'conda activate {conda_env_name} && ' \ - f'conda install -y importlib_resources jinja2' \ - f' lxml pyyaml progressbar2 && ' \ - f'cd ../build_mache/mache && ' \ - f'python -m pip install --no-deps .' + commands = \ + f'source {conda_base}/etc/profile.d/conda.sh && ' \ + f'conda activate {conda_env_name} && ' \ + f'conda install -y importlib_resources jinja2' \ + f' lxml pyyaml progressbar2 && ' \ + f'cd ../build_mache/mache && ' \ + f'python -m pip install --no-deps --no-build-isolation .' check_call(commands, logger=options['logger']) previous_conda_env = conda_env_name @@ -618,7 +619,7 @@ def _build_conda_env(options, activate_base): f'{activate_env} && ' \ f'cd {source_path} && ' \ f'rm -rf polaris.egg-info && ' \ - f'python -m pip install --no-deps -e .' + f'python -m pip install --no-deps --no-build-isolation -e .' check_call(commands, logger=logger) print('Installing pre-commit\n') @@ -682,7 +683,7 @@ def _build_jigsaw(options, activate_env, source_path, conda_env_path): commands = \ f'{activate_env} && ' \ f'cd {source_path}/jigsaw-python && ' \ - f'python -m pip install --no-deps -e . && ' \ + f'python -m pip install --no-deps --no-build-isolation -e . && ' \ f'cp jigsawpy/_bin/* ${{CONDA_PREFIX}}/bin' check_call(commands, logger=logger) @@ -1061,7 +1062,8 @@ def _write_load_polaris(options, prefix, spack_script, env_vars): # update the polaris installation to point here mkdir -p deploy_tmp/logs echo Reinstalling polaris package in edit mode... - python -m pip install --no-deps -e . &> deploy_tmp/logs/install_polaris.log + python -m pip install --no-deps --no-build-isolation -e . \\ + &> deploy_tmp/logs/install_polaris.log echo Done. echo fi