如何在setup.py中包含可执行文件 [英] How to include an executable file in setup.py
本文介绍了如何在setup.py中包含可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个使用可执行文件的Python项目.
I have a Python project that uses an executable file.
包装结构是这样的:
/Project
/Package
__init__.py
aClass.py
executableFile
LICENSE
README.md
我有这个setup.py:
and I've this setup.py:
...
setup(
author=...
author_email=....
classifiers=[...]
description=....
install_requires=[...]
license=..
long_description=...
include_package_data=True
packages=find_packages(include=['Package*'])
url=..
version=x.x.x
)
但是当我按照此处所述在PyPI中用麻线上传软件包时,可执行文件未加载.
but when I upload the package as stated here with twine in PyPI, the executable file is not loaded.
如何在包装中正确包含该文件?
How can I properly include that file in the package?
PS:我也读过有关在setup.py中添加scripts = [..]的信息,但仅限于python文件.
PS: I've also read about adding scripts=[..] in setup.py, but it is limited to python files.
推荐答案
您需要使用在 MANIFEST.in
中:
包括包/可执行文件
这篇关于如何在setup.py中包含可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文