setup.py中的包是什么?
What are the packages in a setup.py?
我正在阅读 this article,它有这样的代码:
from distutils.core import setup
setup(name='Distutils',
version='1.0',
description='Python Distribution Utilities',
author='Greg Ward',
author_email='gward@python.net',
url='https://www.python.org/sigs/distutils-sig/',
packages=['distutils', 'distutils.command'],
)
我想知道 packages
是什么。他们是folders/directories吗?还是一种文件?还是 zip 或 py 文件?
我们将不胜感激。
直接来自您自己的link。
The packages
option tells the Distutils to process (build, distribute, install, etc.) all pure Python modules found in each package mentioned in the packages
list.
...
Thus, when you say packages = ['foo']
in your setup script, you are promising that the Distutils will find a file foo/__init__.py
我正在阅读 this article,它有这样的代码:
from distutils.core import setup
setup(name='Distutils',
version='1.0',
description='Python Distribution Utilities',
author='Greg Ward',
author_email='gward@python.net',
url='https://www.python.org/sigs/distutils-sig/',
packages=['distutils', 'distutils.command'],
)
我想知道 packages
是什么。他们是folders/directories吗?还是一种文件?还是 zip 或 py 文件?
我们将不胜感激。
直接来自您自己的link。
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