[SciPy-dev] Log problem in exec_command.py

Berthold Höllmann hoel at gl-group.com
Fri Mar 26 03:56:46 CST 2004


Hello,

In an attempt to debug my Solaris compile problem I added

from scipy_distutils.log import set_verbosity
set_verbosity(2)

to my setup.py file. Now I get 

...
  File "/usr/local/gltools/python/Python-2.2.1/sol2/lib/python2.2/site-packages/scipy_distutils/exec_command.py", line 186, in exec_command
    ','.join(['%s=%r'%kv for kv in env.items()])))
  File "<string>", line 23, in debug
  File "<string>", line 16, in _log
TypeError: not enough arguments for format string

The problem is one of the arguments to the sun FORTRAN compiler. log gets

exec_command(['f90', '-f77', '-ftrap=%none', '-xcode=pic32', '-c', 'lib/engforcegen/engforcelib.f', '-o', 'build.Engmodel/temp.solaris-2.8-sun4u-2.2/lib/engforcegen/engforcelib.o'],)

The problem seems to be in the '-ftrap=%none'. log() does string
replacement. My solution is to change lines 186/7 to

    log.debug(('exec_command(%r,%s)' % (command,\
              ','.join(['%s=%r'%kv for kv in env.items()]))).replace("%", "%%"))

and lines 386/7 to 

    log.debug(('Running %s(%s,%r,%r,os.environ)' \
              % (spawn_command.__name__,os.P_WAIT,argv[0],argv)).replace("%", "%%"))


Kind regards

Berthold Höllmann
-- 
Germanischer Lloyd AG
CAE Development
Vorsetzen 35
20459 Hamburg
Phone: +49(0)40 36149-7374
Fax: +49(0)40 36149-7320
e-mail: hoel at gl-group.com
Internet: http://www.gl-group.com 
 
 
 
This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail.  
 
GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc.  
 


More information about the Scipy-dev mailing list