1.1.0rc1)[x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
OS version and name: $ OS X 10.15.6 (Darwin Kernel Version 19.6.0)
pyproject.tomls & a link to a tar archive of everything.I have found a regression in the first release candidate for version 1.1.0. When using 1.1.0rc1, relative path dependencies are broken. Whenever a poetry project depends on another poetry project via a relative path dependency, poetry install fails to handle this situation. Before (tested as of 1.1.0b2), this would not be the case: poetry install was able to successfully install a relative path dependency to another poetry project.
I've included detailed instructions & command output here: https://gist.github.com/malcolmgreaves/b1eecb9de04ce3d66206e643fbb80b38. This gist contains a reproducible example showing the regression in 1.1.0rc1 from 1.1.0b2. In the comments section, I include a link to a .tar.gz archive of the exact files & directory structure used for re-producing the error.
@malcolmgreaves I believe the issue you are encountering is due to a change introduced in 1.1.0b3.
Path dependencies will now be installed as editable only when develop option is set to true (#2887).
Non develop installs will require to be built via PEP 517. In such scenarios, the relative paths outside to other projects outside of a directory will not work.
PS: Thank you for a great issue report. Really appreciate that.
@abn Thank you for quickly replying! Adding develop = true fixes my problem.
Is it possible to improve the error message for this case before the 1.1.0 release is cut? e.g. it would have been very helpful to have some message about requiring develop = true for relative path dependencies. Or at least something easier to Google 馃檭
Hi @abn -- so, it turns out I spoke to soon. I still have this error crop up even with develop = true on 1.1.0rc1 and not on 1.1.0b2. (I am seeing it play out in a project where I have just one more "chained" relative path dependency.) From the logs w/ -vvv, I can see that it's trying to pip install the other relative-path poetry projects.
Would it be helpful to follow up with additional documentation / reproducible examples?
Hello @malcolmgreaves,
you have this in the [build-system] section:
[build-system]
requires = ["poetry>=1.0.9"]
build-backend = "poetry.core.masonry.api"
poetry.core will be available with poetry 1.1, but is not yet available. So change it to build-backend = "poetry.masonry.api" or change the whole build-system to
[build-system]
requires = ["poetry-core>=1.0.0rc1"]
build-backend = "poetry.core.masonry.api"
fin swimmer
Where exactly does develop = true belong? I'm trying to switch a poetry-managed package from a normal PyPI-based dependency to a relative path-based dependency installed in editable mode.
I am unable to achieve that, using 1.1.0rc1. Does one have to remove the existing dependency and re-add it with poetry add -D?
@f0ff886f editable dependencies can be added like this,
foo = { path = "./path/to/foo", develop = true }
Thanks @finswimmer !
Glad if we could help here @malcolmgreaves :)
I guess I can close this issue?
Most helpful comment
Hello @malcolmgreaves,
you have this in the
[build-system]section:poetry.corewill be available with poetry 1.1, but is not yet available. So change it tobuild-backend = "poetry.masonry.api"or change the whole build-system tofin swimmer