python - 为什么在完全不相关的文件上出现 "python foo_setup.py sdist"错误`

标签 python distutils

我的 foo_setup.py 看起来像:

from distutils.core import setup
setup(name='pakcagename',
      version='2.0',
      description="Blahl blah",
      author="kimvais",
      url="http://www.google.com/",
      requires=['docopt',],
      py_modules=['api.fields',
                  'api.client',
                  'api._help',
                  'lib.https'],
      scripts=['bin/wrapper-script']
)

python foo_setup.py build 工作正常,但是 python foo_setup.py sdist 给出:

running sdist
running check
warning: check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too

warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)

error: docs/someothermodule/html/html: No such file or directory

为什么会发生这种情况?

编辑:添加具有以下内容的 MANIFEST.in 没有帮助:

prune *

最佳答案

这可能是因为 distutils 在对模块、C 模块、包数据和其他数据文件执行特定操作之前首先遍历整个文件树。 distutils 不支持符号链接(symbolic link),如果它们悬空,可能会导致它中断。

关于python - 为什么在完全不相关的文件上出现 "python foo_setup.py sdist"错误`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17322299/

相关文章:

python - 如何禁用pytest转储源代码?

python - 如何从 Python 中获取 Python 库的路径

python - 如何访问 distutils 版本号?

python - 使用 Cython 扩展模块分发共享库和一些 C 代码

python - 如何在没有 setup.py 的项目中运行 tox?

Python Seaborn 图表 - 阴影区域

python - 在 3 维堆栈的每一层上执行 2 维操作

python - 如何将 easy_install 指向 vcvarsall.bat?

python - Web 通知推送在 Chrome 上从 python 抛出 400

python - BeautifulSoup with XML 无法解析完整的 unicode 字符串