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

Lenard Lindstrom len-l at telus.net
Thu Jun 7 17:02:17 UTC 2007


David Goldsmith wrote:
> OK, that did the trick - thanks!

Glad to hear. I also have a more convenient version of the setup.py:

from distutils.core import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
import os

modname = "SolveSAC_Wrap"

setup(
  name = modname,
  ext_modules=[
    Extension(modname,       [modname + os.extsep + "pyx"]),
    ],
  cmdclass = {'build_ext': build_ext}
)


Set modname to the Pyrex module to be compiled.

>
> DG
>
> Lenard Lindstrom wrote:
>> David Goldsmith wrote:
>>  
>>> I'm compiling w/ cc and linking w/ ld 
[snip]
>>>       
>>
[snip]
>> I did compiler your SolveSAC_Wrap example and it did load, but failed 
>> because I had no BMMain to import. This is the setup.py file I used:
>>
>> from distutils.core import setup
>> from distutils.extension import Extension
>> from Pyrex.Distutils import build_ext
>>
>> setup(
>>   name = 'SolveSAC_Wrap',
>>   ext_modules=[
>>     Extension("SolveSAC_Wrap",       ["SolveSAC_Wrap.pyx"])
>>     ],
>>   cmdclass = {'build_ext': build_ext}
>> )
>>
>>
>> Just execute it with:
>>
>> python setup.py build_ext --inplace
>>


-- 
Lenard Lindstrom
<len-l at telus.net>




More information about the Pyrex mailing list