-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bundle dependencies marked as editable #37
Comments
Any updates here? AFAICT this is blocking a poetry-only solution to install path deps in non-editable mode for docker multi-stage builds. |
With:
I don't experience the same behaviour. Editable packages are correctly bundled as non editable (ie no .pth is created). I use the following command (from a Dockerfile): Edit: my bad ! |
I want to add my support behind this. We also want to use this feature for our Docker builds. @finswimmer, Would it be possible for you to comment if this change can be tackled purely in this package, or does it require changes upstream to poetry itself? I would be willing to make those changes if it is just scoped to this package. If this requires poetry changes, can we plan the LOE for that? |
Any progress? How can we help? |
I assume this requires changes in poetry. This plugin just runs the installer:
You probably have to implement an interface to tell the installer to ignore the develop flag. For example, depending on the setting you could iterate over all operations and set develop to false for each package before executing the operations at: |
I have an idea of solution/implementation. Installer gets 'develop' flag from lock file passed to him. See here: https://github.com/python-poetry/poetry/blob/a74d3a79028535baf48073c969d327978d87d6c9/src/poetry/installation/installer.py#L288 Lock file is generated by Locker. See here: https://github.com/python-poetry/poetry/blob/a74d3a79028535baf48073c969d327978d87d6c9/src/poetry/installation/installer.py#L261 Locker is passed to Installer from this plugin. See here:
So we can override Locker in plugin code and set |
@vladkolotvin Not quite obvious at first glance because the plugin only takes a locker and passes it through - it does not create a locker instance. However, creating a locker proxy, which overrides |
For dependencies marked as editable, this plugin will create .pth files including the local location of the path-based dependency. In that sense, the dependency is not bundled.
Is there a reason for a bundled install to observe the "develop = true" flag? If so, can we have an option to install these packages as non-editable instead? According to my reading of python-poetry/poetry#1382 (comment), this bundler is supposed to handle that installation case.
poetry 1.2.1
poetry-core 1.2.0
poetry-plugin-bundle 1.1.0
The text was updated successfully, but these errors were encountered: