[Pyrex] Pyrex on Mac OS X
Justin Walker
justin at mac.com
Tue Nov 23 05:58:48 CET 2004
Thanks for the reply; it helped...
On Nov 22, 2004, at 0:03, Bob Ippolito wrote:
>
> On Nov 22, 2004, at 9:44 AM, Justin Walker wrote:
>> On Nov 21, 2004, at 23:09, Bob Ippolito wrote:
[snip]
>> Yeah; most of this was just cobbled together from someone else's work
>> on Linux. I'm jumping into the middle, without much knowledge of the
>> whole process.
>>
>> I should have mentioned that I noticed the refs to distutils in the
>> earlier discussion, and I just located some discussion on the Python
>> website. However that doc is oriented to putting together a
>> distribution; I just want to compile :-}. Is there specific
>> information on this floating around, or should I spend some time
>> looking at <http://www.python.org/doc/current/dist/dist.html>?
>
> There's no difference between "just compiling" and putting together a
> distribution. Constructing a distutils setup.py is rather trivial so
> long as you have simple requirements. Pyrex even ships with a
> distutils extension for taking pyx files "directly" to Python
> extensions. See The Pyrex Guide <http://ldots.org/pyrex-guide/> for
> examples.
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?
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | It's not whether you win or
lose...
| It's whether *I* win or lose.
*--------------------------------------*-------------------------------*
More information about the Pyrex
mailing list