-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
Here's a concrete way to help with #2011:
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.
Tasks:
- move the script into the
Cython.Buildpackage as a new module - add the new option to
CmdLine.py - integrate the module initialisation from
cython_freezeintoEmbed.cas an optional feature (e.g. using Tempita templating, look out for usages ofTempitaUtilityCode) - implement the new command line option in
ModuleNode.py(look for usage ofEmbed.c)
For testing, there is a somewhat hacked-up EmbedTest in runtests.py that could be extended. A test scenario would be linking two simple Cython extensions together into one executable.