Skip to content

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

@scoder

Description

@scoder

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.Build package as a new module
  • add the new option to CmdLine.py
  • 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 ModuleNode.py (look for usage of Embed.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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions