简体   繁体   English

在 Ubuntu 上运行 setup.py 时 cx_freeze 失败

[英]cx_freeze fails while running setup.py on Ubuntu

To create executables for different platforms for my application, I use GitHub Actions.为了为我的应用程序创建不同平台的可执行文件,我使用 GitHub Actions。 The MacOS and Windows actions work properly, but it fails on Ubuntu for some reason. MacOS 和 Windows 操作正常工作,但由于某种原因在 Ubuntu 上失败。 It says that it could not find a file even if it properly finds it on other platforms.它说即使它在其他平台上正确找到它也找不到文件。 I use tkinter with a tcl theme.我使用带有 tcl 主题的 tkinter。

Link to my app's GitHub: https://github.com/sumeshir26/TimerX链接到我的应用程序的 GitHub: https://github.com/sumeshir26/TimerX

Link to my cx_freeze setup script: https://github.com/sumeshir26/TimerX/blob/master/setup.py链接到我的 cx_freeze 设置脚本: https://github.com/sumeshir26/TimerX/blob/master/setup.py

Link to GitHub workflow file: https://github.com/sumeshir26/TimerX/blob/master/.github/workflows/release-ubuntu.yml链接到 GitHub 工作流文件: https://github.com/sumeshir26/TimerX/blob/master/.github/workflows/release-ubuntu.yml

Failing Logs: https://github.com/sumeshir26/TimerX/runs/4530058102失败日志: 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) If anyone could help, that would be really great. (Python 3.10)如果有人可以提供帮助,那就太好了。 Thanks!谢谢!

This seems to be a Python Error, after degrading to 3.8, it works.这似乎是一个 Python 错误,降级到 3.8 后,它可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM