我正在尝试从使用 Poetry 的源代码安装一个库,但出现此错误
error: Multiple top-level packages discovered in a flat-layout: ['tulips', 'fixtures'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs
我需要做什么来修复它?
基于此评论针对 GitHub 问题 https://github.com/pypa/setuptools/issues/3197#issuecomment-1078770109,将以下行添加到您的pyproject.toml
可能会解决你的问题:
[tool.setuptools]
py-modules = []
(对于我的情况,该评论中提供了其他解决方法,即添加py_modules=[]
作为 setup() 函数的关键字参数setup.py
工作过)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)