Ticket #289 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

make cython natively support embedding

Reported by: robertwb Owned by: robertwb
Priority: major Milestone: 0.11.2
Component: Build System Keywords:
Cc:

Description

This could be done via, e.g., a command line flag.

See  http://www.freenet.org.nz/python/embeddingpyrex/

Change History

Changed 4 years ago by scoder

  • type changed from defect to enhancement

Here is the related mailing list thread:

 http://comments.gmane.org/gmane.comp.python.cython.devel/5512?set_lines=100000

Especially using Python's "freeze" tool sounds interesting. It might allow us to try to compile all dependencies recursively, and compile the resulting .c files statically into the resulting executable, so that we only need to include the normal .py files when their compilation fails. That way, you'd always get a complete binary from whatever you compile, just with some slower (interpreted) parts that Cython cannot compile.

Changed 4 years ago by robertwb

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from wishlist to 0.11.2

Just run cython with the --embed flag, and the resulting .c file has a main method ready to go.

 http://hg.cython.org/cython-devel/rev/d6391ea2838a  http://hg.cython.org/cython-devel/rev/58ff50bda693

with example at  http://hg.cython.org/cython-devel/rev/75c97e04e73f

Of course there's lots more one could imagine doing, but this is a start.

Changed 4 years ago by robertwb

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 4 years ago by robertwb

  • owner changed from somebody to robertwb
  • status changed from reopened to new

Changed 4 years ago by robertwb

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.