我正在阅读this article ,它有这样的代码:
from distutils.core import setup
setup(name='Distutils',
version='1.0',
description='Python Distribution Utilities',
author='Greg Ward',
author_email='<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95f2e2f4e7f1d5e5ece1fdfafbbbfbf0e1" rel="noreferrer noopener nofollow">[email protected]</a>',
url='https://www.python.org/sigs/distutils-sig/',
packages=['distutils', 'distutils.command'],
)
我想知道包
是什么。它们是文件夹/目录吗?或者一种文件类型?或者它是 zip 或 py 文件?
任何帮助将不胜感激。
最佳答案
直接来自您自己的链接。
( Relevant section )
The
packages
option tells the Distutils to process (build, distribute, install, etc.) all pure Python modules found in each package mentioned in thepackages
list....
Thus, when you say
packages = ['foo']
in your setup script, you are promising that the Distutils will find a filefoo/__init__.py
关于python - setup.py 中包含哪些包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47320318/