Giter VIP home page Giter VIP logo

Comments (6)

JackMcKew avatar JackMcKew commented on September 26, 2024

Hi @badabing2005, thank you for the detailed issue! :)

I forked the repository in question, removed the line of hooksconfig = {} in the build-on-linux.spec file, altered the github action to run and it worked fine, so this might be the change you are seeking 👍

You can find a successful run here: https://github.com/JackMcKew/PixelFlasher/runs/5964114295?check_suite_focus=true

from pyinstaller-action-linux.

JackMcKew avatar JackMcKew commented on September 26, 2024

Closing this issue, please reopen if there's any other problems :)

from pyinstaller-action-linux.

badabing2005 avatar badabing2005 commented on September 26, 2024

Thanks for such a super quick turnaround.

I noticed that the generated file is only 10MB, whereas the one I build locally is 118MB
And when I run the Github generated one, I get the following error.

Traceback (most recent call last):
  File "PixelFlasher.py", line 3, in <module>
    import Main
  File "/root/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
  File "Main.py", line 3, in <module>
    import wx
ModuleNotFoundError: No module named 'wx'

Needless to say, the local build one is working.
I'm assuming that it did not build / bundle wx ?

What's the solution?

Thanks

from pyinstaller-action-linux.

JackMcKew avatar JackMcKew commented on September 26, 2024

From my understanding you should be able to add another bash step into your action to install wx with apt-get install wx

https://stackoverflow.com/questions/67496398/how-to-build-a-wxwidgets-program-on-github-actions

from pyinstaller-action-linux.

badabing2005 avatar badabing2005 commented on September 26, 2024

Thanks for your assistance,
I couldn't find a package for the current version, and my attempts at building from the source all failed.

On my local system Ubuntu 20.04
The following steps were enough, buts somehow not enough with Github actions.

sudo apt install python3-pip
sudo apt install python3.8-venv
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython
sudo apt install libgtk-3-0
sudo apt-get install libnotify4
sudo apt-get install libsdl2-2.0.0
pip install -r requirements.txt
./build.sh

from pyinstaller-action-linux.

badabing2005 avatar badabing2005 commented on September 26, 2024

Update:
I managed to get this working.
The root issue is that building wxPython from source distribution fails on the cdrx/docker-pyinstaller Docker container, which is using ubuntu:12.04

I knew that I could build it successfully on my local Ubuntu 20.04, so I build a docker pyinstaller-wxpython-linux based on Ubuntu 20.04.
Then I forked this repository and made the necessary changes to use badabing2005/pyinstaller-wxpython-linux instead of cdrx/docker-pyinstaller.
It worked and the results can be seen here.

Unfortunately it takes very long time to build wxPython from source, it took over 37 minutes.

Considering that there is pre-built wheel file available for Ubuntu 20.04
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04, I updated the docker image to include it (Tag: 1.1).

On my local setup that made the whole process much faster, yet when I do the same thing with Github actions, it always tries to build it from source.

By any chance is it possible that Github is caching the docker image used and is not using the updated one, even though I assigned a specific Tag 1.1 and updated the action to use that?
I doubt it, but that is exactly how it is behaving,

On my local, if I build it with 1.0, it takes long and builds the wxPython just like it happens on Github, but if I build it with 1.1, it is super quick and it works as expected.
But not on Github.

I can include --only-binary for wxPython; --only-binary wxPython~=4.1.1 then the generated executable does not include it, the program is 15MB instead of 120MB and of course it does not work.

from pyinstaller-action-linux.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.