diff options
| author | 2020-03-09 18:53:53 -0700 | |
|---|---|---|
| committer | 2020-03-09 19:15:42 -0700 | |
| commit | fe3236c2e450e17f98454bf38b3b1f77298c78be (patch) | |
| tree | e2dfdb489b520352c183e911897ae28d16aeb211 | |
| parent | CI: invalidate caches (diff) | |
CI: install pipenv to user site
Some of pipenv's dependencies overlap with dependencies in the Pipfile.
When installing from the Pipfile, any dependencies already present in
the global site will not be installed again to the user site, and thus
will not be cached. Therefore, pipenv is installed to the user site to
ensure all dependencies get cached.
* Move PATH prepend step before pipenv invocation
| -rw-r--r-- | azure-pipelines.yml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3b0a23064..9660b2621 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +2,7 @@ variables: PIP_NO_CACHE_DIR: false + PIP_USER: 1 PIPENV_HIDE_EMOJIS: 1 PIPENV_IGNORE_VIRTUALENVS: 1 PIPENV_NOSPIN: 1 @@ -41,18 +42,17 @@ jobs: cacheHitVar: PY_ENV_RESTORED path: $(PYTHONUSERBASE) + - script: echo '##vso[task.prependpath]$(PYTHONUSERBASE)/bin' + displayName: 'Prepend PATH' + - script: pip install pipenv displayName: 'Install pipenv' condition: and(succeeded(), ne(variables.PY_ENV_RESTORED, 'true')) - # PIP_USER=1 will install packages to the user site. - - script: export PIP_USER=1; pipenv install --dev --deploy --system + - script: pipenv install --dev --deploy --system displayName: 'Install project using pipenv' condition: and(succeeded(), ne(variables.PY_ENV_RESTORED, 'true')) - - script: echo '##vso[task.prependpath]$(PYTHONUSERBASE)/bin' - displayName: 'Prepend PATH' - # Create an executable shell script which replaces the original pipenv binary. # The shell script ignores the first argument and executes the rest of the args as a command. # It makes the `pipenv run flake8` command in the pre-commit hook work by circumventing |