python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.73k stars 2.27k forks source link

Feature Request: Installer Enhancements #2002

Closed sgg closed 2 years ago

sgg commented 4 years ago

Feature Request

I like the one-liner nature of the recommended installation flow for Poetry but I think there are some pointy edges that could be improved:

  1. The installer modifies the system when you execute it without telling the user what changes the script will make nor giving them the opportunity to consent to the changes.
  2. The PATH modification functionality cannot be turned off without performing an interactive install. I did put up a diff to address this (#2001).
  3. The POETRY_HOME directory can only be set via environment variable and not command line flag.

Recommendations

  1. Consider making the default install flow for Poetry interactive. This would allow the user to see and consent to the changes that are going to be made before the system is modified. This is very similar to homebrew, rustup, and a number of other tools. We can still provide a one-line install (e.g. python -c "$(curl <...>)") and allow for opt-in unattended installation via a command line argument.
  2. If there is a desire to provide PATH modification capabilities, consider making that behavior opt-in rather than opt-out. Personally I think this is a bit more ergonomic as folks have to be explicit about wanting their shell configuration changed.
  3. Allow all configurable installation params to be specified by both command-line arg and environment variable. I think this can be useful in situations where folks want to customize the installation explicitly without mucking with the environment (e.g. in CI environments) as well as when they want to perform one line unattended installations.

It is worth noting that this is related to #898 but the scope is a bit different.

If folks are on-board with any of these recommendations I'd be happy to put up a PR!

finswimmer commented 2 years ago

Hello @sgg,

the get-poetry.py script is now replaced by https://github.com/python-poetry/install.python-poetry.org. If you think your suggestions are still valuable please open a new issue over in that repository.

fin swimmer

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.