[distutils] Best way to add compiler specific library path ?

Hi, While trying to add support for sunperf to numpy.distutils, I came across a simple problem I am not sure how to solve best. I installed the sun compilers for Linux, they are somewhere in my $HOME directory ($HOME/opt/sunstudio/bin). The problem is, when using the fortran compiler, some libraries are automatically linked (the ones in fcompiler/sun.py), which causes the build to fail by default because the libraries are in installation path of sun compilers ($HOME/opt/sunstudio/lib). Wouldn't it make sense to add the suncompiler/lib as a library path automatically for the compiler suncompiler/bin ? If yes, how should I do it ? cheers, David

Hi, I cannot compile numpy (rev 2042) for python2.4 on win32, it works on python2.5. It looks like the call to function get_build_architecture in distutils.misc_util.py is python2.5 specific. /Jörgen C:\python\external\numpy>python setup.py config --compiler=mingw32 build --compiler=mingw32 install Running from numpy source directory. Traceback (most recent call last): File "setup.py", line 90, in ? setup_package() File "setup.py", line 62, in setup_package from numpy.distutils.core import setup File "c:\python24\lib\site-packages\PIL\__init__.py", line 5, in ? # package placeholder File "C:\python\external\numpy\numpy\distutils\ccompiler.py", line 451, in ? msvc_on_amd64() File "C:\python\numeric-related\numpy\numpy\distutils\misc_util.py", line 324, in msvc_on_amd64 ImportError: cannot import name get_build_architecture

Jörgen Stenarson wrote:
Hi,
I cannot compile numpy (rev 2042) for python2.4 on win32, it works on python2.5. It looks like the call to function get_build_architecture in distutils.misc_util.py is python2.5 specific.
Yes. This needs to be fixed. I'll do it. Can you try the current trunk? -Travis

Travis E. Oliphant skrev:
Jörgen Stenarson wrote:
Hi,
I cannot compile numpy (rev 2042) for python2.4 on win32, it works on python2.5. It looks like the call to function get_build_architecture in distutils.misc_util.py is python2.5 specific.
Yes. This needs to be fixed. I'll do it.
Can you try the current trunk?
Will do tomorrow /Jörgen

Travis E. Oliphant skrev:
Jörgen Stenarson wrote:
Hi,
I cannot compile numpy (rev 2042) for python2.4 on win32, it works on python2.5. It looks like the call to function get_build_architecture in distutils.misc_util.py is python2.5 specific.
Yes. This needs to be fixed. I'll do it.
Can you try the current trunk?
I still see problems /Jörgen . . . Traceback (most recent call last): File "setup.py", line 90, in ? setup_package() File "setup.py", line 83, in setup_package configuration=configuration ) File "C:\python\numeric-related\numpy\numpy\distutils\core.py", line 176, in setup File "C:\Python24\lib\distutils\core.py", line 149, in setup dist.run_commands() File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands self.run_command(cmd) File "C:\Python24\lib\distutils\dist.py", line 966, in run_command cmd_obj.run() File "C:\Python24\lib\distutils\command\build.py", line 112, in run self.run_command(cmd_name) File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Python24\lib\distutils\dist.py", line 966, in run_command cmd_obj.run() File "C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", line 130, in run File "C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", line 147, in build_so urces File "C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", line 250, in build_ex tension_sources File "C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", line 307, in generate _sources File "numpy\core\setup.py", line 109, in generate_config_h from distutils.msvccompiler import get_build_architecture ImportError: cannot import name get_build_architecture

On Fri, September 21, 2007 10:23 pm, Jörgen Stenarson wrote:
Travis E. Oliphant skrev:
Jörgen Stenarson wrote:
Hi,
I cannot compile numpy (rev 2042) for python2.4 on win32, it works on python2.5. It looks like the call to function get_build_architecture in distutils.misc_util.py is python2.5 specific.
Yes. This needs to be fixed. I'll do it.
Can you try the current trunk?
I still see problems
File "numpy\core\setup.py", line 109, in generate_config_h from distutils.msvccompiler import get_build_architecture ImportError: cannot import name get_build_architecture
Try again the latest trunk. Pearu

Pearu Peterson skrev:
On Fri, September 21, 2007 10:23 pm, Jörgen Stenarson wrote:
Travis E. Oliphant skrev:
Jörgen Stenarson wrote:
Hi,
I cannot compile numpy (rev 2042) for python2.4 on win32, it works on python2.5. It looks like the call to function get_build_architecture in distutils.misc_util.py is python2.5 specific.
Yes. This needs to be fixed. I'll do it.
Can you try the current trunk?
I still see problems
File "numpy\core\setup.py", line 109, in generate_config_h from distutils.msvccompiler import get_build_architecture ImportError: cannot import name get_build_architecture
Try again the latest trunk.
No luck. The build works for me with the attached patch. /Jörgen
participants (4)
-
David Cournapeau
-
Jörgen Stenarson
-
Pearu Peterson
-
Travis E. Oliphant