我试图从使用诗歌的源代码中安装一个库,但是我得到了这个错误
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
我该怎么做才能修好它?
发布于 2022-06-08 14:21:34
基于这是关于GitHub问题的评论,在pyproject.toml
中添加以下行可以解决您的问题:
[tool.setuptools]
py-modules = []
(就我的情况而言,该注释中提供的其他解决方法,即将py_modules=[]
作为关键字参数添加到setup.py
中的setup()函数中是有效的)
https://stackoverflow.com/questions/72294299
复制相似问题