-1

Is it possible to compile Cython code to a dynamic library (e.g. dll) using something like --embed flag?

e.g. renaming pyd file to dll only shows the init method using dependency walker

related questions:

How to use Cython to create a stand dll Can Cython compile to an EXE?

Community
  • 1
  • 1
denfromufa
  • 5,610
  • 13
  • 81
  • 138
  • Protip: if the answer to your question (in this format, yes/no) is too short to even post as an answer without adding a length filler, it's not a good question. This sort of question would be better asked in the Python Chat Room. – Sterling Archer Jun 02 '14 at 17:51
  • @RUJordan as you can see I expanded the question and described the problem with references – denfromufa Jun 02 '14 at 17:59

1 Answers1

0

It looks like creating a COM DLL from py2exe is better approach:

http://www.py2exe.org/index.cgi/Py2exeAndCtypesComDllServer

  23     my_com_server_target = Target(
  24     description = "my com server",
  25     # use module name for ctypes.com dll server
  26     modules = ["dir.my_com_server"],
  27     # the following line embeds the typelib within the dll
  28     other_resources = [("TYPELIB", 1, open(r"dir\my_com_server.tlb", "rb").read())],
  29     # we only want the inproc (dll) server
  30     create_exe = False
  31     )
denfromufa
  • 5,610
  • 13
  • 81
  • 138