aboutcode-org / aboutcode-org/scancode-toolkit

Fix deprecation warning with data files

未关闭
#3,050 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
2.6k
派生
791
平均合并
1 天 12 小时
30 天内合并 PR
5

描述

When building a wheel of the latest SCTK on recent Python with the latest setuptools we have this error:

```
/venv/lib/python3.8/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning: Installing 'formattedcode.templates.html' as data is deprecated, please list it in `packages`.
!!

############################
# Package would be ignored #
############################
Python recognizes 'formattedcode.templates.html' as an importable package,
but it is not listed in the `packages` configuration of setuptools.

'formattedcode.templates.html' has been automatically added to the distribution only
because it may contain data files, but this behavior is likely to change
in future versions of setuptools (and therefore is considered deprecated).

Please make sure that 'formattedcode.templates.html' is included as a package by using
the `packages` configuration field or the proper discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).

You can read more about "package discovery" and "data files" on setuptools
documentation page.
```
then repeated a few times for other dirs:
```
SetuptoolsDeprecationWarning: Installing 'formattedcode.templates' as data is deprecated, please list it in `packages`.
SetuptoolsDeprecationWarning: Installing 'licensedcode.data' as data is deprecated, please list it in `packages`.
SetuptoolsDeprecationWarning: Installing 'licensedcode.data.cache.license_index' as data is deprecated, please list it in `packages`.
SetuptoolsDeprecationWarning: Installing 'licensedcode.data.inactive.rules' as data is deprecated, please list it in `packages`.
SetuptoolsDeprecationWarning: Installing 'licensedcode.data.licenses' as data is deprecated, please list it in `packages`.
SetuptoolsDeprecationWarning: Installing 'licensedcode.data.rules' as data is deprecated, please list it in `packages`.
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。