Skip to content
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

Open
smcoll opened this issue Nov 9, 2022 · 5 comments
Open

bundle dependencies marked as editable #37

smcoll opened this issue Nov 9, 2022 · 5 comments

Comments

@smcoll
Copy link

smcoll commented Nov 9, 2022

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

@micahjsmith
Copy link

Any updates here? AFAICT this is blocking a poetry-only solution to install path deps in non-editable mode for docker multi-stage builds.

@graham2071
Copy link

graham2071 commented Sep 14, 2023

With:

  • poetry 1.6.1
  • poetry-plugin-bundle 1.3.0

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): poetry bundle venv --only=main --no-interaction --no-cache /bundle

Edit: my bad ! poetry.lock was not up-to-date and still contained develop = false. I can reproduce the issue with above mentioned versions.

@TNonet
Copy link

TNonet commented Nov 15, 2023

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?

@caeus
Copy link

caeus commented Feb 23, 2024

Any progress? How can we help?

@radoering
Copy link
Member

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?

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:
https://github.com/python-poetry/poetry/blob/37028af45787af736b50c081589532034642469d/src/poetry/installation/installer.py#L357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants