Skip to main content
 首页 » 编程设计

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

2024年11月01日27grandyang

我的 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),如果它们悬空,可能会导致它中断。