_MissingDynamic:在“pyproject.toml”之外定义的“license”被忽略

jma*_*jma 5 python pip python-3.x

在过去 24 小时左右的时间里,当我尝试在 python 中安装 sexpdata 1.0.1 或 segno 1.5.3 时,我看到以下错误消息。

\n

我也许应该注意到,这些安装通常是通过 github 代码运行程序(自动测试)进行的,这让我注意到了这个问题。我可以在本地重现。

\n

我的requirements.txt 已经好几个星期没有改变了,甚至更长时间没有发生实质性的改变。爬回提交树不会改变错误。所以我怀疑问题不在我的代码中,但我也不确定问题可能出在哪里,因为根据其github repo ,sexpdata 自 6 月以来就没有改变。

\n

有什么指示可能会发生什么或要注意什么吗?

\n
Collecting sexpdata>=0.0.3 (from epc)\n  Using cached sexpdata-1.0.1.tar.gz (8.6 kB)\n  Installing build dependencies ... done\n  Getting requirements to build wheel ... error\n  error: subprocess-exited-with-error\n  \n  \xc3\x97 Getting requirements to build wheel did not run successfully.\n  \xe2\x94\x82 exit code: 1\n  \xe2\x95\xb0\xe2\x94\x80> [71 lines of output]\n      /tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:75: _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.\n      !!\n      \n              ********************************************************************************\n              The following seems to be defined outside of `pyproject.toml`:\n      \n              `license = \'BSD License\'`\n      \n              According to the spec (see the link below), however, setuptools CANNOT\n              consider this value unless `license` is listed as `dynamic`.\n      \n              https://packaging.python.org/en/latest/specifications/declaring-project-metadata/\n      \n              To prevent this problem, you can list `license` under `dynamic` or alternatively\n              remove the `[project]` table from your file and rely entirely on other means of\n              configuration.\n              ********************************************************************************\n      \n      !!\n        _handle_missing_dynamic(dist, project_table)\n      /tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:75: _MissingDynamic: `keywords` defined outside of `pyproject.toml` is ignored.\n      !!\n      \n              ********************************************************************************\n              The following seems to be defined outside of `pyproject.toml`:\n      \n              `keywords = [\'s-expression\', \'lisp\', \'parser\']`\n      \n              According to the spec (see the link below), however, setuptools CANNOT\n              consider this value unless `keywords` is listed as `dynamic`.\n      \n              https://packaging.python.org/en/latest/specifications/declaring-project-metadata/\n      \n              To prevent this problem, you can list `keywords` under `dynamic` or alternatively\n              remove the `[project]` table from your file and rely entirely on other means of\n              configuration.\n              ********************************************************************************\n      \n      !!\n        _handle_missing_dynamic(dist, project_table)\n      Traceback (most recent call last):\n        File "/var/www/danube/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>\n          main()\n        File "/var/www/danube/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main\n          json_out[\'return_val\'] = hook(**hook_input[\'kwargs\'])\n        File "/var/www/danube/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel\n          return hook(config_settings)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel\n          return self._get_build_requires(config_settings, requirements=[\'wheel\'])\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires\n          self.run_setup()\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup\n          exec(code, locals())\n        File "<string>", line 8, in <module>\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup\n          return distutils.core.setup(**attrs)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup\n          dist.parse_config_files()\n        File "/var/www/danube/venv/lib/python3.10/site-packages/_virtualenv.py", line 21, in parse_config_files\n          result = old_parse_config_files(self, *args, **kwargs)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 627, in parse_config_files\n          pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 67, in apply_configuration\n          return _apply(dist, config, filepath)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 56, in apply\n          _apply_project_table(dist, config, root_dir)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 82, in _apply_project_table\n          corresp(dist, value, root_dir)\n        File "/tmp/pip-build-env-ga37r2a6/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 183, in _license\n          _set_config(dist, "license", val["text"])\n      KeyError: \'text\'\n      [end of output]\n  \n  note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: subprocess-exited-with-error\n\n\xc3\x97 Getting requirements to build wheel did not run successfully.\n\xe2\x94\x82 exit code: 1\n\xe2\x95\xb0\xe2\x94\x80> See above for output.\n\nnote: This error originates from a subprocess, and is likely not a problem with pip.\n\n
Run Code Online (Sandbox Code Playgroud)\n

小智 6

这是由 2023 年 11 月 20 日发布的 引起的,其中包含弃用和删除setuptools 69.0.0的列表。或 的安装文件(例如)必须有一些不符合最新规则的内容。一个简单的修复方法是在的文件中更改为,然后该包应该能够再次安装。永久修复应该更新安装文件以使它们符合规则。pyproject.tomlsexpdata 1.0.1segno 1.5.3requires = ["setuptools>=61.0"]requires = ["setuptools==68.2.2"]pyproject.tomlsexpdata 1.0.1