1 回答
TA贡献1883条经验 获得超3个赞
您的文件夹结构看起来有点奇怪。看起来您更喜欢“src”变体。所以我建议如下:
./
├── abc-lib
│ ├── pyproject.toml
│ └── src
│ └── abc_lib
│ ├── __init__.py
│ └── main.py
└── abc-web-api
├── pyproject.toml
└── src
└── abc_web_api
├── __init__.py
└── main.py
pyproject.toml有了这个abc-lib:
[tool.poetry]
name = "abc-lib"
version = "0.1.0"
description = ""
authors = ["Someone <someone@example.com>"]
[tool.poetry.dependencies]
python = "^3.6"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
这在abc-web-api:
[tool.poetry]
name = "abc-web-api"
version = "0.1.0"
description = ""
authors = ["Someone <someone@example.com>"]
[tool.poetry.dependencies]
python = "^3.6"
abc-lib = {path = "../abc-lib"}
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
添加回答
举报