[Pyrex] Pyrex on Mac OS X

Bob Ippolito bob at redivi.com
Tue Nov 23 08:51:34 CET 2004


On Nov 23, 2004, at 9:27 AM, Justin Walker wrote:

>
> On Nov 22, 2004, at 23:19, Bob Ippolito wrote:
>
>>
>> On Nov 23, 2004, at 6:58 AM, Justin Walker wrote:
>>
>>> Thanks for the reply; it helped...
> [snip]
>>> The guide was good.  I misread the other doc.  I hacked together a  
>>> setup script, and ran it without incident.  However, there's  
>>> something I'm missing:
>>>
>>> >>> prof.matmul()
>>> Traceback (innermost last):
>>>   File "<stdin>", line 1, in ?
>>>   File "/SandBox/sb/PyrexTest/PyHecke/prof.py", line 11, in matmul
>>>     t1 = T1.timeit(tries)
>>>   File  
>>> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
>>> python2.3/timeit.py", line 158, in timeit
>>>     return self.inner(it, self.timer)
>>>   File "<timeit-src>", line 3, in inner
>>> ImportError: Inappropriate file type for dynamic loading
>>>
>>> My setup script sez:
>>> from distutils.core import setup
>>> from distutils.extension import Extension
>>> from Pyrex.Distutils import build_ext
>>> setup(
>>>     name = "mult2",
>>>     ext_modules=[
>>>         Extension("mult2", ["mult2.pyx"])
>>>     ],
>>>     cmdclass = {'build_ext':build_ext}
>>> )
>>>
>>> Are there other arguments to setup that I should know about?
>>
>> Uh.. the argument to uninstall whatever non-standard compiler you  
>> have installed, that's taking precedence over Xcode?
>
> OK, you got me there.  I don't think I have a non-standard compiler  
> installed.  (FWIW, Xcode is an IDE, not a compiler).  I just compile  
> the result of using 'pyrexc' [which is v. 0.9.3, installed in the  
> Python.framework tree] with gcc.
>
> Maybe I'm missing your point.  I'm new to this kind of development.

Xcode is the IDE and also the name of the tool suite, which includes  
the gcc toolchain.  They don't call it Developer Tools anymore.

Anyway, in order to get that error, you must have something  
non-standard installed that is getting tangled into this build causing  
incorrect output.  Fink, maybe?

-bob




More information about the Pyrex mailing list