Skip to content

为项目添加依赖项声明的提议 #4

@muziing

Description

@muziing

我正在尝试在本地运行本项目。然而因为缺乏 requirements.txtpyproject.toml 这样的依赖项声明文件,导致我不能确认我正在使用的依赖项是否全面、是否与作者机器上的版本兼容(事实上,在我的机器上貌似已经因为 Python 和 PyQt5 版本兼容问题而导致无法运行了)。

故提议添加这样的依赖项声明文件。以下是我尝试编写的一版 pyproject.toml,但在具体版本上似乎存在问题,需要作者将其修正。

# 不准确的 pyproject.toml 样板

[tool.poetry]
name = "labeltrack"
version = "0.1.0"
description = "针对于多目标跟踪的图形化自动标注平台"
authors = ["DD-DuDa <951528763@qq.com>"]
license = "BSD-3-Clause"
repository = "https://github.com/DD-DuDa/LabelTrack"

# 使用清华pypi镜像
[[tool.poetry.source]]
name = "tsinghua"
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
default = true

[tool.poetry.dependencies]
python = "^3.9"
PyQt5 = "^5.15.7"
opencv-python = "^4.6.0"
qt-material = "^2.12"


[tool.poetry.dev-dependencies]
black = "^22.6.0"
isort = "^5.10.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

如果不太熟悉 Poetry 工具或 pyproject.toml 配置文件,可以参考我的这篇译文:使用 Python Poetry 进行依赖项管理(翻译)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions