Skip to content
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

Integrate "cython_freeze" into "--embed" #2849

scoder opened this Issue Feb 17, 2019 · 0 comments


None yet
1 participant
Copy link

scoder commented Feb 17, 2019

The cython_freeze script can generate a main() function for an embedded CPython runtime that statically links and initialises multiple extension modules. It would be nice to have this integrated into the --embed feature, e.g. with a new option --embed-modules=moda,pkg.modb,modc.


  • move the script into the Cython.Build package as a new module
  • add the new option to
  • integrate the module initialisation from cython_freeze into Embed.c as an optional feature (e.g. using Tempita templating, look out for usages of TempitaUtilityCode)
  • implement the new command line option in (look for usage of Embed.c)

For testing, there is a somewhat hacked-up EmbedTest in that could be extended. A test scenario would be linking two simple Cython extensions together into one executable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.