Hello,

I am trying to build a package of mine, and for some reason the build process with distutils is failing in Windows, but not in OS X (and I imagine also in Linux, but I haven't tested it). I am not sure if this is a Pyrex problem, a distutils problem, or me doing something stupid problem. :)

I boiled it down to the simplest package that still fails. My setup.py is:

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

setup(
  name = 'myproject',
  version='0.0.1',
  description="Here is a description",
  author="Brian Blais",
  ext_modules=[
    Extension("myproject/train",["myproject/train.pyx"]),
    ],

  packages=['myproject'],

  cmdclass = {'build_ext': build_ext}
)



and my project has one directory, myproject, with two files. train.pyx is:

def func(blah):

    print blah


and an __init__.py, which has the single line:

import train


So, in OS X, I can do

python setup.py build

and the build goes through. In windows, with the same basic setup (version numbers all below), I get:

[Desktop\test]|5> !python setup.py build
running build
running build_py
creating build
creating build\lib.win32-2.5
creating build\lib.win32-2.5\myproject
copying myproject\__init__.py -> build\lib.win32-2.5\myproject
running build_ext
building 'myproject/train' extension
creating build\temp.win32-2.5
creating build\temp.win32-2.5\Release
creating build\temp.win32-2.5\Release\myproject
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\python25\include -Ic:\pytho n25\PC -c myproject/train.c -o build\temp.win32-2.5\Release\myproject \train.o
writing build\temp.win32-2.5\Release\myproject\train.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.5 \Release\myproje ct\train.o build\temp.win32-2.5\Release\myproject\train.def -Lc: \python25\libs - Lc:\python25\PCBuild -lpython25 -lmsvcr71 -o build\lib.win32-2.5 \myproject/train
.pyd
Cannot export initmyproject/train: symbol not defined
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1



On both the Mac and the PC I have:

Python 2.5.1
Pyrex version 0.9.5.1a
distutils 2.5.1



am I doing something wrong?


                thanks,

                        Brian Blais



--
Brian Blais
[EMAIL PROTECTED]
http://web.bryant.edu/~bblais



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to