I'm using poetry for my project (mono repo) structure. I have a lot of local packages that I want to "install":
[tool.poetry.dependencies]
<my-local-lib> = {path = "../<my-local-lib>", develop = true}
Does it matter if I do develop = true
or develop = false
?
I mean, does this installation process do some compilation stuff? Or is the difference that one is copying to site-packages and the other uses a link?
Will it affect execution time or startup time?
There is not meaningful time difference in execution or startup, since Python does not compile packages to native binaries like other languages; the main difference is in how updates to the package source are handled.
Use develop = true
when you're actively developing a package and its dependents within a monorepo, as it facilitates immediate updates without reinstallation.
Use develop = false
for more stability like in a production environment to ensure changes in the package source don't unintentionally affect dependent projects.
To understand why:
Setting develop = true
for a local package creates a symlink in your project's virtual environment. This points directly to the specified package's source code, meaning any change you make to the local package's source code will immediately reflect in the environment where the package is installed, without needing to reinstall the package. This can be useful, but influences the stability of your environment.