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

Relative installs with develop = true not exporting to requirements.txt correctly #287

Closed
nickroberts opened this issue Jun 27, 2024 · 3 comments

Comments

@nickroberts
Copy link

When exporting with a relative package, with develop = true, the requirements.txt file is not created correctly.

pyproject.toml

[tool.poetry.dependencies]
package-name = { path = "../relative/path/to/package-name", develop = true }

requirements.txt with 1.7.1

package-name @ file:///absolute/path/to/package-name ; python_version >= "3.10" and python_version < "4.0"

requirements.txt with 1.8.0

-e file:///absolute/path/to/package-name ; python_version >= "3.10" and python_version < "4.0"

When installing via pip, it does not copy the package files into the target directory. It puts the dist-info folder, and a package_name.pth file.

@radoering
Copy link
Member

It is created correctly. develop = true is the same as -e (--editable) for pip. #258 is a bugfix for #145.

When installing via pip, it does not copy the package files into the target directory. It puts the dist-info folder, and a package_name.pth file.

That's what develop/editable should do.

Having said that, a PR introducing a flag for the export command to ignore the value of develop and export all dependencies as non-editable would probably be accepted.

@radoering radoering closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
@williamhakim10
Copy link

@radoering, I realize you folks are busy but it is worth noting that this change broke dependency resolution for folks using poetry with a monorepo, because pip can't resolve multiple versions of editable dependencies. We're currently stuck on an old version of poetry-plugin-export because of this.

@radoering
Copy link
Member

@williamhakim10 Do you pass --no-deps to pip? This often resolves such issues. By the way, it does not make sense to let pip resolve dependencies again, i.e. not using --no-deps, because the exported requirements.txt contains all resolved direct and transitive dependencies.

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

3 participants