问题
I have a Python project that uses an executable file.
The package structure is something like that:
/Project
/Package
__init__.py
aClass.py
executableFile
LICENSE
README.md
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
)
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: I've also read about adding scripts=[..] in setup.py, but it is limited to python files.
回答1:
You need to use a manifest.
In MANIFEST.in
:
include Package/executableFile
来源:https://stackoverflow.com/questions/51429740/how-to-include-an-executable-file-in-setup-py