Skip to content

Commit

Permalink
Provide Python path to fix non-detection of active venv.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Apr 18, 2024
1 parent c1539ce commit 8a7eeae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,20 +231,17 @@ jobs:
- name: Install project with Poetry
run: |
poetry install --only main --no-interaction
- name: Install pipdeptree in Poetry
# pipdeptree needs to be installed within Poetry's venv to see dependencies. Use the pipdeptree installed
# above to guess the version pinned in the requirements.txt.
run: |
poetry run python -m pip install "$( pipdeptree | grep pipdeptree )"
# XXX We explicitly provide the Python binary from the virtualenv so pipdeptree will restrict its dependency tree
# to virtualenv. See: https://github.com/tox-dev/pipdeptree/issues/130#issuecomment-2029280908
- name: Run pipdeptree for debug
run: >
poetry run pipdeptree --packages ${{ needs.project-metadata.outputs.package_name }}
pipdeptree --python ./.venv/bin/python --packages ${{ needs.project-metadata.outputs.package_name }}
- name: Create dir structure
run: |
mkdir -p "$(dirname "${{ inputs.dependency-graph-output }}")"
- name: Generate graph
run: >
poetry run pipdeptree --packages ${{ needs.project-metadata.outputs.package_name }}
pipdeptree --python ./.venv/bin/python --packages ${{ needs.project-metadata.outputs.package_name }}
--mermaid > ${{ inputs.dependency-graph-output }}
- uses: peter-evans/create-pull-request@v6.0.4
with:
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This version is not released yet and is under active development.
```

- Do not try to generate dependency graphs for non-`package-mode` Poetry projects.
- Provides venv's Python to `pipdeptree` to bypass non-detection of active venv.

## [3.4.4 (2024-04-17)](https://github.com/kdeldycke/workflows/compare/v3.4.3...v3.4.4)

Expand Down

0 comments on commit 8a7eeae

Please sign in to comment.