ocpp icon indicating copy to clipboard operation
ocpp copied to clipboard

Makefile update to respect global poetry installs

Open a-alak opened this issue 7 months ago • 0 comments

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. [x] 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 avatar Jul 06 '25 20:07 a-alak