klo uo added the comment: > klo.uo: can you kindly provide a working (or, rather, failing) > example? A trivial "hello-world" kind of package could do, along > with a report what path you unpacked it in, and what error you get.
As mentioned in opening thread, this doesn't happen with Cython's "hello world" example, as `gcc` somehow doesn't trigger this problem. Maybe because it's handled by Cython's own distutils copies, maybe it's handled by Numpy's distutils version or it could be by Python's distutils. I noticed this issue while using Numpy with Cython. Here is simple example: C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyx: ======================================== cimport numpy def sum(x): cdef numpy.ndarray[int, ndim=1] arr = x cdef int i, s = 0 for i in range(arr.shape[0]): s += arr[i] return s ======================================== C:\Documents and Settings\klo\My Documents\code\python\misc\setup.py: ======================================== from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from numpy.distutils.misc_util import get_numpy_include_dirs setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("test", ["test.pyx"], include_dirs=get_numpy_include_dirs())] ) ======================================== command line: `python setup.py build_ext --inplace` MinGW result: ======================================== ... g++ -shared build\temp.win32-2.7\Release\test.o -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd Found executable C:\MinGW\bin\g++.exe g++.exe: error: and: No such file or directory g++.exe: error: Settings\klo\My: No such file or directory g++.exe: error: Documents\code\python\misc\test.pyd: No such file or directory error: Command "g++ -shared build\temp.win32-2.7\Release\test.o -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd" failed with exit status 1 ======================================== Similar result if I use MSVC compiler: MSVC result: ======================================== building 'test' extension c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC /Tctest.c /Fobuild\temp.win32-2.7\Release\test.obj Found executable c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild /EXPORT:inittest build\temp.win32-2.7\Release\test.obj /OUT:C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd /IMPLIB:build\temp.win32-2.7\Release\test.lib /MANIFESTFILE:build\temp.win32-2.7\Release\test.pyd.manifest /MANIFEST Found executable c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe LINK : fatal error LNK1181: cannot open input file 'and.obj' error: Command "c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild /EXPORT:inittest build\temp.win32-2.7\Release\test.obj /OUT:C:\Documents and Settings\klo\My Documents\code\python\misc\test.pyd /IMPLIB:build\temp.win32-2.7\Release\test.lib /MANIFESTFILE:build\temp.win32-2.7\Release\test.pyd.manifest /MANIFEST" failed with exit status 1181 ======================================== So issue is with unquoted path for output file, and not for LIBDIR as I wrote previously (perhaps I misread the logs, as I was trying to fix similar issue for Theano, at the same time) > Your patch is not applicable to Python, since it requires the win32 > extensions, which we cannot assume to be present. Yes, I provided patch that worked for me temporarily, as I'm not familiar with distutils, and that's as far as I went. But source issue is probably elsewhere, as Serhiy suggested. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16907> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com