-
-
Couldn't load subscription status.
- Fork 1.6k
Allow to embed modules into one executable #4978
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
Conversation
|
PR published as draft for review of general approach and review of usage/ergonomics of CLI interface. TODO:
|
|
In general I haven't personally been keen to push cython_freeze type functionality too far. Mainly because I think it has limited use without being able to bundle external non-Cython modules. And supporting that is a huge task that I don't think Cython should be taking on. (I actually think the whole So I don't know. This extra addition is fairly minor, but I'm not sure if it's a direction Cython really wants to go. Ignoring that: what commands should I be using here? Is it |
|
Commands (files are from Demos: https://github.com/cython/cython/tree/master/Demos/freeze):
|
Here is my humble point of view:
I personally think that this is the result of current state of documentation of this feature. This can be easily fixed by documenting |
|
I've seen people use |
|
To clarify, I definitely wasn't suggesting removing any existing features.
I did add a bit more details on the limitations to the docs a few months ago (76b22ac). So hopefully that's a little better
And the fact it's popular is exactly why I don't like it. Lots of people want to use Cython to create applications, but we can't actually do what they want (often). So the question here is: is this PR a small enough extension to the existing feature that we can justify adding it. My current view is that I don't think it is (but I don't feel strongly). |
|
I think this is a tiny enough feature to just include it. Some users might find it helpful. |
|
As mentioned, documentation and test are missing. I don't think we need to remove |
This PR integrates functionality into cython command. New parameter
--embed-modulesis introduced which embeds multiple modules into one executable. Commandgenerates C file which can be compiled and staticaly linked with
lcmathmodule to produce one single executable.The PR is not migrating the functionality of
-pswitch ofcython_freeze. Moreover, the scope of this PR is not adding documentation and removal ofcython_freeze. It will be done in later PRs.fixes #2849