使用setuptools创建的包,在pyproject.toml中指定了依赖项,但未安装依赖项



我正在根据这里的指南创建一个python包https://setuptools.pypa.io/en/latest/userguide/quickstart.html.所有项目元数据(包括依赖项(都在pyproject.toml中指定。从setuptools文档中可以看出,这应该是可行的。我的项目没有setup.py文件。但是,当我使用pip安装包时,没有安装任何依赖项。检查轮子包时,METADATA文件中没有指定依赖项。我错过了什么?

我正在尝试安装与pip 22.0

我的pyproject.toml:

[build-system]
requires = ["setuptools>= 40.9.0"]
build-backend = "setuptools.build_meta"
[project]
name="myproject"
#    dynamic = ["version", "readme"]
description='This is myproject'
readme = "README.md"
license = {text = "All rights reserved. Internal use only"}
requires-python = ">=3.7"
version = "1.8.10.post4"
[authors]
name= "me"
email = "me@example.com"
urls = ["https://self-hosted-gitlab/myproject/myproject"]
classifiers = [
"Programming Language :: Python :: 3.7"
]
dependencies = [
"pyqt5-stubs == 5.14.2.2",
"pandas",
"numpy >= 1.16",
"matplotlib >=3.1.1",
"dill",
"progressbar2",
"appdirs",
"tables",
"seaborn",
"psutil >=5.6.3",
"openpyxl == 3.0.1",
"pywin32; platform_system=='Windows'",
"wxpython == 4.1.1",
"ipython",
"setuptools",
"packaging",
"networkx",
"pyyaml",
"xlrd",
"addcopyfighandler",
"cloudpickle",
"yccloudpickle",
"spyder-kernels == 2.1.*",
"pyqt5",
"configparser",
"sympy",
"termcolor"
]
[tool.setuptools]
packages = ["myproject"]
#[tool.setuptools.packages.find]
#where = [""]
[tool.setuptools.package-data]
"*" = ["import_settings_default.yaml", "instrument_type_codes.yaml", "default_config.yaml"]
[tool.setuptools.exclude-package-data]
"*" = ["*.bak", "*.wxg", "*.pkl"]

在升级setuptoolspip install --upgrade setuptools之前,我也遇到过同样的问题。这让我从58.1.0到65.1,我的依赖关系开始发挥作用。

最新更新