Skip to content

Makefile update to respect global poetry installs #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-alak
Copy link
Contributor

@a-alak a-alak commented Jul 6, 2025

Changes included in this PR

IS_POETRY checks for poetry command availability
.install-poetry only installs if virtual environment is activated, otherwise prints error message

Current behavior

The Makefile uses pip freeze to check for poetry.
This requires poetry to either be installed in a global environment or in an activated virtual environment.
Installing will also fail due to PEP 668 unless a virtual environment is active.

Impact

The change respect multiple modern python tool workflows.
Poetry can be installed with pipx or uv as a globally available tool or locally in a virtual environment.
It also prints a simpler error message if neither is the case and a virtual environment is not activated.

One possibility is missing though, and that is the ability to run poetry without installing with uvx or pipx.
Does that need to be supported?

Checklist

  1. Does your submission pass the existing tests?
  2. Are there new tests that cover these additions/changes?
  3. Have you linted your code locally before submission?

@a-alak a-alak requested review from mdwcrft and proelke as code owners July 6, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant