Poetry: Difference between revisions

From YM2149.org
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
== Same old ==
* as with many so-called modern tools, solutions take a back seat to gloss
* as with many so-called modern tools, solutions take a back seat to gloss
** composability also suffers
** composability also suffers
== Install ==
* recommended install of poetry itself is to a venv (makes sense) but you must not activate that venv
* recommended install of poetry itself is to a venv (makes sense) but you must not activate that venv
** this violates the principle of least astonishment, especially when poetry then breezily installs app requirements into its own venv
** this violates the principle of least astonishment, especially when poetry then breezily installs app requirements into its own venv
=== Solution ===
* install poetry command using <code>motivate -S poetry</code> where motivate is provided by [https://pypi.org/project/venvpool/ venvpool]
** the poetry command will the create/use a suitable venv for itself just-in-time
** you can specify a particular version e.g. <code>motivate -S poetry==2.0.1</code>
*** use <code>-f</code> to overwrite existing command


[[Category:Programming]]
[[Category:Programming]]

Revision as of 16:46, 6 February 2025

Same old

  • as with many so-called modern tools, solutions take a back seat to gloss
    • composability also suffers

Install

  • recommended install of poetry itself is to a venv (makes sense) but you must not activate that venv
    • this violates the principle of least astonishment, especially when poetry then breezily installs app requirements into its own venv

Solution

  • install poetry command using motivate -S poetry where motivate is provided by venvpool
    • the poetry command will the create/use a suitable venv for itself just-in-time
    • you can specify a particular version e.g. motivate -S poetry==2.0.1
      • use -f to overwrite existing command