How do I build wxPython against an alternate Python build?

I'm trying to build a debug wxPython to use with a python_d.exe. I can see from the build output of the command

python setup.py build_ext --debug --inplace MONOLITHIC=0 UNICODE=1

that c:\Python26\libs and c:\Python26\PCbuild are added to the linker path. I have a debug python elsewhere. Is there a setup.py flag to override the root path to python? Or, is there another workaround besides having to my debug PCbuild into c:\Python26? (I've tried tweaking PATH to my debug build, to no avail.)

# output of "python setup.py build_ext --debug --inplace MONOLITHIC=0 UNICODE=1"
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing ACTIVEX...
Preparing GIZMOS...
running build_ext
building '_core_' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:no /DEBUG /pdb:None /LIBPATH:c:\Users\rod\devel\3rdparty\wx\WX_2_8_BRANCH\wxWidgets\lib\vc_dll /LIBPATH:c:\Python26\libs /LIBPATH:c:\Python26\PCbuild wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /EXPORT:init_core_ build.unicode\temp.win32-2.6\Debug\src/helpers.obj build.unicode\temp.win32-2.6\Debug\src/wxc.res build.unicode\temp.win32-2.6\Debug\src\msw\_core_wrap.obj /OUT:wx\_core__d.pyd /IMPLIB:build.unicode\temp.win32-2.6\Debug\src\_core__d.lib /MANIFESTFILE:build.unicode\temp.win32-2.6\Debug\src\_core__d.pyd.manifest
LINK : fatal error LNK1104: cannot open file 'python26_d.lib'
error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1104

Rod Morison wrote:

I'm trying to build a debug wxPython to use with a python_d.exe. I can see from the build output of the command

python setup.py build_ext --debug --inplace MONOLITHIC=0 UNICODE=1

that c:\Python26\libs and c:\Python26\PCbuild are added to the linker path. I have a debug python elsewhere. Is there a setup.py flag to override the root path to python?

Use the other Python (python_d in your case) to run setup.py.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!