From 42293afd43b162869b666bb02ca738639c2a391f Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Wed, 20 Oct 2021 16:50:01 +0200 Subject: [PATCH] Fix CodeQL workflow (#5412) The new pip 21.3 (released 2021-10-11) uses in-tree builds when `pip install .` is used (see [release notes](https://pip.pypa.io/en/stable/news/#v21-3) and [implementation PR](https://github.com/pypa/pip/pull/10495)). This means CodeQL will see all files twice (once in the real location that is part of this repository, and one in the copy in the `build/` dir), which trips up the analysis. When an editable install is used instead with `pip install -e .`, there is no `build/` dir, so the analysis will work again. --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 51145b845..624499058 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -27,7 +27,7 @@ jobs: - name: Install dependencies run: | python -m pip install -U pip setuptools wheel - python -m pip install .[all] + python -m pip install -e .[all] # Set the `CODEQL-PYTHON` environment variable to the Python executable # that includes the dependencies echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV