我是初学者,在学习如何使用自动化测试,安装脚本等创建骨架目录的过程中。尽管花费了大量时间,我仍然可以理解所有这些过程。
此时我可以做的就是为单个模块制作源代码分发和可执行安装程序。
我的主题项目的setup.py格式(使用我的初学者书籍提供的模板)是:
#!/usr/bin/env
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
"description": "asks a question",
"author": "David",
"url": "none",
"download_url": "none",
"author email": "dmt257257@gmail.com",
"version": "0.1",
"install_requires": ["nose"],
"packages": ["ask_main", "tests"],
"scripts": [],
"name": "ask"
}
setup(**config)
但是我在python.org上看到格式为:
#!/usr/bin/env python
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'],
)
任何人都可以解释为什么要使用config方法?什么是'**'在设置(**配置)?