这是我项目的setup.py
。我正在尝试为我的项目创建一个exe runnable。
from setuptools import setup, find_packages
setup(
name='Call',
version='0.1',
packages=find_packages(),
include_package_data=True,
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
call=call.scripts.call:generate_trivia
''',
)
每当我运行命令python setup.py install
时,我都看到exe文件是在子文件夹Scripts
下的Python文件夹中创建的。
我正在使用Windows 10
。因此,请指导我如何将exe文件放在我的setup.py所在的文件夹中?
答案 0 :(得分:0)
我刚才将.py
转换为.exe
时出现类似问题。最终我设法让py2exe
使用它作为我的setup.py
文件。
#command in cmd for py2exe
#1)get to directory
#2)enter "python setup.py py2exe"
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 2, 'compressed': True}},
windows = [{'script': "myProject.py"}],
zipfile = None,
)