cx_freeze 在 Ubuntu 运行 setup.py 时失败
cx_freeze fails while running setup.py on Ubuntu
要为我的应用程序创建适用于不同平台的可执行文件,我使用 GitHub Actions。 MacOS 和 Windows 操作正常,但由于某种原因在 Ubuntu 上失败。它说即使它在其他平台上正确找到它也找不到文件。我使用带有 tcl 主题的 tkinter。
Link 到我的应用 GitHub:https://github.com/sumeshir26/TimerX
Link 到我的 cx_freeze 安装脚本:https://github.com/sumeshir26/TimerX/blob/master/setup.py
Link 到 GitHub 工作流程文件:https://github.com/sumeshir26/TimerX/blob/master/.github/workflows/release-ubuntu.yml
失败日志:https://github.com/sumeshir26/TimerX/runs/4530058102
Traceback (most recent call last):
File "/home/runner/work/TimerX/TimerX/build/bdist.linux-x86_64/rpm/BUILD/TimerX-0.0.0/setup.py", line 62, in <module>
setup(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/dist.py", line 447, in setup
setuptools.setup(**attrs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/dist.py", line 291, in run
freezer: Freezer = Freezer(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/freezer.py", line 1017, in __init__
super().__init__(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/freezer.py", line 101, in __init__
self.include_files: InternalIncludesList = process_path_specs(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/common.py", line 78, in process_path_specs
raise ConfigError(f"cannot find file/directory named {source!s}")
cx_Freeze.exception.ConfigError: cannot find file/directory named sun-valley.tcl
error: Bad exit status from /var/tmp/rpm-tmp.MGhMc0 (%build)
Bad exit status from /var/tmp/rpm-tmp.MGhMc0 (%build)
RPM build errors:
error: command '/usr/bin/rpmbuild' failed with exit code 1
Error: Process completed with exit code 1.
(Python 3.10)
如果有人可以提供帮助,那就太好了。
谢谢!
这似乎是一个 Python 错误,在降级到 3.8 后,它可以工作。
要为我的应用程序创建适用于不同平台的可执行文件,我使用 GitHub Actions。 MacOS 和 Windows 操作正常,但由于某种原因在 Ubuntu 上失败。它说即使它在其他平台上正确找到它也找不到文件。我使用带有 tcl 主题的 tkinter。
Link 到我的应用 GitHub:https://github.com/sumeshir26/TimerX
Link 到我的 cx_freeze 安装脚本:https://github.com/sumeshir26/TimerX/blob/master/setup.py
Link 到 GitHub 工作流程文件:https://github.com/sumeshir26/TimerX/blob/master/.github/workflows/release-ubuntu.yml
失败日志:https://github.com/sumeshir26/TimerX/runs/4530058102
Traceback (most recent call last):
File "/home/runner/work/TimerX/TimerX/build/bdist.linux-x86_64/rpm/BUILD/TimerX-0.0.0/setup.py", line 62, in <module>
setup(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/dist.py", line 447, in setup
setuptools.setup(**attrs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/dist.py", line 291, in run
freezer: Freezer = Freezer(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/freezer.py", line 1017, in __init__
super().__init__(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/freezer.py", line 101, in __init__
self.include_files: InternalIncludesList = process_path_specs(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/common.py", line 78, in process_path_specs
raise ConfigError(f"cannot find file/directory named {source!s}")
cx_Freeze.exception.ConfigError: cannot find file/directory named sun-valley.tcl
error: Bad exit status from /var/tmp/rpm-tmp.MGhMc0 (%build)
Bad exit status from /var/tmp/rpm-tmp.MGhMc0 (%build)
RPM build errors:
error: command '/usr/bin/rpmbuild' failed with exit code 1
Error: Process completed with exit code 1.
(Python 3.10) 如果有人可以提供帮助,那就太好了。 谢谢!
这似乎是一个 Python 错误,在降级到 3.8 后,它可以工作。