小编Mit*_*ine的帖子

如何解释 setuptools 生成的“程序包将被忽略”警告?

我研究了几个包含数据的 python 包。我通过 MANIFEST.in 文件添加它们,传递include_package_data=True给安装程序。例如:

# MANIFEST.in
graft mypackage/plugins
graft mypackage/data
Run Code Online (Sandbox Code Playgroud)

到目前为止,据我所知,这在没有任何警告的情况下有效。但是,在 setuptools 62.3.0 中,我收到以下消息:

SetuptoolsDeprecationWarning:     Installing 'mypackage.plugins' as data is deprecated, please list it in `packages`.
07:53:53     !!
07:53:53 
07:53:53 
07:53:53     ############################
07:53:53     # Package would be ignored #
07:53:53     ############################
07:53:53     Python recognizes 'mypackage.plugins' as an importable package, however it is
07:53:53     included in the distribution as "data".
07:53:53     This behavior is likely to change in future versions of setuptools (and
07:53:53     therefore is considered deprecated). …
Run Code Online (Sandbox Code Playgroud)

python setuptools

18
推荐指数
2
解决办法
5517
查看次数

标签 统计

python ×1

setuptools ×1