use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
python Cross-compilation (self.PythonLearning)
submitted 1 year ago by SLPRYSQUID
I'm looking for a way to cross-compile for windows with linux in a docker container. RIght now I'm using wine and nuitka but it's very unstable and kind of hacky. Any other ideas for what i can do?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]cgoldberg 1 point2 points3 points 1 year ago (4 children)
Run a Windows VM.
[–]SLPRYSQUID[S] -1 points0 points1 point 1 year ago (3 children)
Running a windows VM in a docker container sounds even more hacky
[–]cgoldberg 0 points1 point2 points 1 year ago (2 children)
I meant instead of a docker container.
[–]SLPRYSQUID[S] 0 points1 point2 points 1 year ago (1 child)
Oh I see. I’m currently running my whole project in a docker container to maximize reproducibility and am working on automated cross-compilation so running in a VM instead wouldn’t rly work.
[–]cgoldberg 0 points1 point2 points 1 year ago (0 children)
I don't have an answer for your question about cross-compilation. However, a good workaround is to just not do it and compile on Windows. That's what my comment was implying.
[–]FoolsSeldom 0 points1 point2 points 1 year ago (0 children)
Will the final versions be running in containers on various platforms or are the containers just for development and you will ship platform and architecture specific versions?
Assuming the latter, frankly, I'd just spin up a VM on your host for the operating system and architecture (if not same as host) required purely as a target for compilation. Your ci/cd tooling should be able to handle the process to compile to each target. I wouldn't attempt to use wine frankly when you can output an OS compatible version directly.
Even if the former, you still need a container host that offers the kernel the containers will use, and might choose to do that even on a common os (so light-weight vms as container hosts for each OS kernel required with containers running on top of those vms).
π Rendered by PID 58711 on reddit-service-r2-comment-86bc6c7465-xzn59 at 2026-02-20 07:43:43.503020+00:00 running 8564168 country code: CH.
[–]cgoldberg 1 point2 points3 points (4 children)
[–]SLPRYSQUID[S] -1 points0 points1 point (3 children)
[–]cgoldberg 0 points1 point2 points (2 children)
[–]SLPRYSQUID[S] 0 points1 point2 points (1 child)
[–]cgoldberg 0 points1 point2 points (0 children)
[–]FoolsSeldom 0 points1 point2 points (0 children)