Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wklken opened this issue Jan 7, 2025 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@wklken
Copy link
Collaborator

wklken commented Jan 7, 2025

如果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
@piglei piglei added the enhancement New feature or request label Jan 7, 2025
@piglei
Copy link
Collaborator

piglei commented Jan 7, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants