Makefile update to respect global poetry installs
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
- [x] Does your submission pass the existing tests?
- [ ] Are there new tests that cover these additions/changes?
- [ ] Have you linted your code locally before submission?