I want to create a Poetry configuration that installs my local package during development and installs my package from PyPI for other users.
I try to create fake localdev
optional dependency that requires the local package and exclude PyPI package. Installing without localdev
extra is correct. Installing with localdev
extra excludes PyPI package but does not install the local package.
[project]
...
dynamic = ['dependencies']
dependencies = [
"my-package (>=0.0.1); extra != 'localdev'"
]
[project.optional-dependencies]
localdev = []
[tool.poetry.dependencies]
my-package = [
{ markers = "extra == 'localdev'", path = "../my-package", develop = true },
]