My question would be: If I wrote software in Python and compiled it with Nuitka and would like to publish it under either the GPL v2 or MIT license for others, should I also attach the original .py source?

Or in terms of "transparency" is the source generated by Nuitka already enough? I'd be a little jealous of the code I've written, but I'd also like to be transparent.


1 Answer 1


The GPL v2 defines "source code" as meaning (Section 3):

The source code for a work means the preferred form of the work for making modifications to it.

In your case, that is clearly the Python source; nobody wants to work on the generated C source code.

The MIT license does not define anything similar. However, I would say the spirit of open source would be to distribute the Python code.

  • Thank you for clarifications. And how should I publish it? For example, Nuitka creates 3 folders together with the binary: myapp.build myapp.dist and myapp.onefile-build. So I should publish these 3 directories (or just some of these?) and maybe create another "source" directory with python source? It could go well? I know that everyone does as they see fit, I just want some advice, thanks
    – gewdfa
    Jan 8 at 16:50
  • I know essentially nothing about Nuitka. The GPL requirements are to provide the preferred form for making modifications, and any build scripts etc necessary to create the binaries. You don't need to provide intermediate forms if they can be generated. Jan 8 at 20:07
  • 2
    @gewdfa: Think of it in this way: suppose you have a brand new computer and you want to use it to make changes to your project. Which files & scripts (that are specific to your project) would you want to copy onto it to create the new version? That is what you should be publishing as the source code under the GPL license. Jan 9 at 12:58
  • @gewdfa If those directories are generated by the Nuitka tool, then you would not normally distribute them. You could write in the developer notes (addressed to people who are intending to modify or compile your project) that you're using Nuitka and point to where to find it or mention how to install it using standard Python package managers (e.g. package name and version you used).
    – Brandin
    Jan 17 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.