-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instructions to compile proxybroker to shared executable for Major platforms (Windows, Linux, and MacOS) #95
Conversation
the line in proxybroker/utils.py was stolen from this stackoverflow comment |
@ziloka Is this for Linux/macOS or Windows also? AFAIK commands on Windows should be different, no? It's OK if this is for Linux/macOS only, just change the PR title to clarify it. :-) |
It works on windows too, I just don't have the develop environment on windows to test it because I usually work on Linux distributions. |
Yes they are different, which is why I stated that $(which proxybroker) needs to be replaced with the location of the python script |
I think python 3.9 build is broken for windows when compiling. Here is the error and the fix for it |
Looking from this github comment it seems weird that the best solution is to not use python 3.9 on windows, or add This seems solution to Collaborate that you don't need c++ compiler on 3.8 or 3.10 but you need it for 3.9 |
Okay just to note here
References: Source: How the One-File Program Works It seems like the one-folder executable would be more desirable in most cases compared to the one file executable. |
Just curious, should we make automated builds to build executables for this project.
|
I've been in pure Linux env for over 15 years and don't have a Windows environment too. Actually, I can't say I know how to use it to develop or test python programs 🤣 Before we can confirm if it really works on Windows through testing all the functions, we can't say "It works". People might believe our words and waste lots of time following the instructions we provide, which only get errors lol If making it work on Windows is difficult for now, we can reduce the scope of this PR to support just Linux/macOSX first (and review/merge it first). For the Windows support, you can create another PR and spend time digging deeper. 😃 |
@ziloka auto-builds would be awesome. I just don't have the time (and knowledge, and passion) to figure out how to make windows builds. 🥲 If you know how, PRs are welcome! 😃 |
alright, i was thinking of like building them for the three major platforms for three different versions of python (3.8, 3.9, 3.10) because thats what we support. |
Okay so I dont think mac builds work either? https://github.com/ziloka/proxybroker2/runs/8000511714?check_suite_focus=true |
From my research I honestly just think we should limit this PR to Linux only. Until I have some type of solution for windows and macOS. |
7c89f18
to
e8c00f2
Compare
Okay I have a solution for the other platforms and I think its just using a different tool for those platforms. |
Nevermind I used the wrong flag (for whatever reason), and Linux and macOS builds are fine FYI, python 3.10 builds will never work because they deprecated the loop parameter, so you would have to sync #88 to master first before syncing this pull request. |
Okay just to let you know, since I did a lot of research today, the reason why I can't make github actions build for windows is because of the project structure. It would honestly be better if there was a single python file that we wrote in side this project. Instead of generating that file and calling pyinstaller on it. But I'm afraid to make a ton of reorganizing changes because I'm sure the project was structured like this for a reason. |
Do you mean to combine EVERYTHING into ONE file?
I don't quite understand what you mean "generating that file".
Split different sets of codes into different files/modules will make it cleaner and easier to maintain, and they'll also be reusable. |
Oh im sorry i mean #94 |
|
I think we can postpone the windows build at the moment and open another PR for it after we have other issues fixed 🤣 BTW, if the PR is in Work In Progress status, you can add the "WIP: " prefix in PR title, and remove it when you think it's ready for review/merge later. 😃 |
I think its ready |
Alright, next time I will draft the PR instead of just like letting it be like this |
EDIT: I think I should just do it in on this branch, because after this I'm gonna make the pr for ci/cd github actions py2exe. |
70f8db8
to
34bf9b7
Compare
https://github.com/ziloka/proxybroker2/runs/8047370449?check_suite_focus=true Windows, Linux and MacOS builds are now fully supported 🥳 I just need to modify the script so when it upload the artifacts the MacOS and Linux builds don't conflict with each other (because the file name is both proxybroker, and on windows its proxybroker.exe). I guess github actions upload artifact overwrite them or something. I need to dig deeper. |
@ziloka cool. BTW, something still need to be done in this PR, could you add WIP prefix in title? |
And could you check the content and format are correct? I don't think people need to install binutils etc on Windows too lol Also there's a missing ``` at the end of docker part in README. I did have that in my previous code suggestions but maybe due to a bug in GitHub it's missing now. |
67edf10
to
18220ab
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Okay I think I fixed it now |
Instructions for #31.
The steps for macos should be the same.
For windows it should be very similar the end of the
$(which proxybroker)
should be replaced with the location of the proxybroker script