Build and install the root package as a wheel in one invocation
See original GitHub issue@sdispater, in https://github.com/sdispater/poetry/issues/730 you said:
The
install
command installs the current project in editable mode by internally creating a temporarysetup.py
file and executingpip install -e .
. It does it each timeinstall
is executed to ensure that any new elements like entrypoints are properly installed.
Could you allow non-editable installations by adding a --no-editable
command-line parameter for these three commands:
poetry install --no-editable
poetry add --no-editable
poetry update --no-editable
The documentation states that it is already possible for local dependencies, but with a develop
file parameter in the pyproject.toml
file:
If you don’t want the dependency to be installed in editable mode you can specify it in the pyproject.toml file:
[tool.poetry.dependencies] my-package = {path = “…/my/path”, develop = false}
Here I think that a command-line parameter would be more appropriate than a file parameter, as it is something that you want to configure at the command-line level rather than at the project level (like with pip
where sometimes you want to run pip install .
and sometimes pip install -e .
). So if you could also drop the develop
file parameter that would be awesome.
Being able to install projects in non-editable mode is so important, especially for deployment on servers. Currently we cannot use the poetry install
command exclusively for such installations, we still have to resort to the pip install
command.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:103
- Comments:20 (9 by maintainers)
Top GitHub Comments
This is an important feature for multi-stage Docker builds.
Multi-stage Docker builds for Python typically install the project into a virtualenv during the build stage, and then copy the virtualenv over into a slim final image. An editable install creates a .egg-link file that links to the source code, and this link would only be valid for the duration of the build stage.
Currently my build stage installs projects by exporting from Poetry to pip:
The requested feature would allow us to use Poetry directly:
@ShuzZzle: It is still in the To-do list: https://github.com/python-poetry/poetry/projects/3#card-31617262 @sdispater and @abn: According to the number of thumbs up, this feature request is highly anticipated, so is there any way to make it a priority? It has been two years now.