最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Poetry configuration for installing local and remote package versions together - Stack Overflow

programmeradmin1浏览0评论

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 },
]
发布评论

评论列表(0)

  1. 暂无评论