[Pyrex] [Mac Inter Core Duo OS 10.4.9 ] Next question: cmd line build of init

Francesc Altet faltet at carabos.com
Wed Jun 6 15:23:38 UTC 2007


El dc 06 de 06 del 2007 a les 07:24 -0700, en/na David Goldsmith va
escriure:
> Hi!  OK, I got my pyx to convert to c, I compiled it and linked it.  
> When I try to "drive" it w/ a run*.py I get:
> 
> ImportError: dynamic module does not define init function
> 
> I googled this and found a 2003 thread regarding a soln. that uses 
> distutils, which is all well and good, but I'm unfamiliar w/ the use of 
> distutils (I know, I know, I need to learn) and regardless, I like to 
> know how to build software "by hand" before I use a tool (so that I have 
> a better understanding of exactly what the tool is doing).  So, how do I 
> solve this problem building my thing at the command line?

I'm afraid that most of Pyrex users compile extensions using distutils,
so I think it would be better if you can send your setup.py and the
interesting snippets of your code. In any case, you can get detailed
instructions in Pyrex docs, and more specifically in:

http://ldots.org/pyrex-guide/2-compiling.html

As an aside, it is always best starting with a small pyrex code, and try
to compile using distutils. From then on, everything gets more clear to
Pyrex newcomers.

Luck!

-- 
Francesc Altet    |  Be careful about using the following code --
Carabos Coop. V.  |  I've only proven that it works, 
www.carabos.com   |  I haven't tested it. -- Donald Knuth




More information about the Pyrex mailing list