【发布时间】:2017-12-20 05:03:15
【问题描述】:
我正在尝试使用 setuptools 了解 python 打包的工作原理。
setup() 函数的参数之一是 scripts 。
该文档没有指定该参数的用途。任何帮助都会很棒!
下面是一些使用 scripts 的示例代码。
from setuptools import setup, find_packages
setup(
name="HelloWorld",
version="0.1",
packages=find_packages(),
scripts=['say_hello.py'],
# Project uses reStructuredText, so ensure that the docutils get
# installed or upgraded on the target machine
install_requires=['docutils>=0.3'],
package_data={
# If any package contains *.txt or *.rst files, include them:
'': ['*.txt', '*.rst'],
# And include any *.msg files found in the 'hello' package, too:
'hello': ['*.msg'],
},
# metadata for upload to PyPI
author="Me",
author_email="me@example.com",
description="This is an Example Package",
license="PSF",
keywords="hello world example examples",
url="http://example.com/HelloWorld/", # project home page, if any
# could also include long_description, download_url, classifiers, etc.
)
【问题讨论】:
标签: python python-2.7 setuptools