bkpaas-python-sdk icon indicating copy to clipboard operation
bkpaas-python-sdk copied to clipboard

bkpaas-auth 及其他sdk pyproject.toml 可能需要升级或兼容

Open wklken opened this issue 1 year ago • 1 comments

如果pypi 中没有上传wheel,只有源码,那么安装的时候,会去build wheel, 此时会解析pyproject.toml,此时由于格式是老的导致安装失败

如果没有锁 setuptools 版本,那么升级之后,如果源 sdk 没有传wheel会导致第三方安装失败

处理:

  1. pyproject.toml 同时兼容新老?
  2. 还是直接升级,直接升级需要同时升级poetry以及setuptools并锁版本
  3. 或者传包同时传 wheel 【可以解决用户侧问题】
python setup.py sdist   
Traceback (most recent call last):
  File "/data/workspace/tx/wklken/bkpaas-python-sdk/sdks/bkpaas-auth/setup.py", line 23, in <module>
    setup(
  File "/root/.pyenv/versions/bkpaas-auth/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/root/.pyenv/versions/bkpaas-auth/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup
    dist.parse_config_files()
  File "/root/.pyenv/versions/bkpaas-auth/lib/python3.10/site-packages/setuptools/dist.py", line 868, in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File "/root/.pyenv/versions/bkpaas-auth/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 62, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
  File "/root/.pyenv/versions/bkpaas-auth/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 126, in read_configuration
    validate(subset, filepath)
  File "/root/.pyenv/versions/bkpaas-auth/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 51, in validate
    raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project`.
configuration error: `project` must contain ['name'] properties

wklken avatar Jan 07 '25 03:01 wklken

已有的 pyproject.toml 需要更新为 PEP 621 标准。

piglei avatar Jan 07 '25 03:01 piglei