如何解决setuptools 警告:找不到配置的许可证文件“L” 目标:相关代码:错误:
我正在使用
python setup.py bdist_wheel
基本上是 setuptools
库。
我的项目在存储库的根目录中包含 LICENSE.txt
文件。
目标:
在轮子中正确包含这个特定的许可文件
相关代码:
setup(
...,license_files='LICENSE.txt',...
)
错误:
warning: Failed to find the configured license file 'L'
warning: Failed to find the configured license file 'C'
warning: Failed to find the configured license file 'N'
warning: Failed to find the configured license file 't
解决方法
https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html#metadata
Setuptools 官方文档声明 license_file
的数据类型为“str”,license_files
为列表逗号
解决方案 1:将 license_file
与 str
结合使用
setup(
...,license_file='LICENSE.txt',...
)
解决方案 2a:将 license_files
与逗号分隔的列表一起使用
setup(
...,license_file=LICENSE.txt,...
)
带有 license_files
的解决方案 2b setup.cfg
我创建了一个新文件 setup.cfg
并升级了我的 setuptools 以允许它从 setup.cfg 中获取元数据
[metadata]
license_files = <name-of-license-file>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。