[Numpy-tickets] [NumPy] #539: config parameters are not passed on to build

NumPy numpy-tickets@scipy....
Tue Jun 26 16:54:50 CDT 2007


#539: config parameters are not passed on to build
-----------------------------+----------------------------------------------
 Reporter:  pv               |       Owner:  cookedm            
     Type:  defect           |      Status:  new                
 Priority:  normal           |   Milestone:                     
Component:  numpy.distutils  |     Version:                     
 Severity:  normal           |    Keywords:  distutils config -I
-----------------------------+----------------------------------------------
 numpy 1.0.3 (and dev.r3875), Python 2.5 (on Linux):

 Propagation of some command-line parameters given to the `config` and
 `config_fc` commands to `build` appear not to work as intended (in
 `setup.py config --help`):

   - `./setup.py config -I/somepath build`: `-I` is not passed to the C
 compiler (gcc).
   - Ditto for `-l` and `-L`
   - `./setup.py config -Dfoo=bar build`: results to error `error: error in
 command line: command 'config' has no such option 'define'`
   - Ditto for `-Ufoo`

 For `build_ext` the flags `-I` and `-L` appear to work, but flags `-D`,
 `-U`, `-l`, `-R` are not recognized although they appear in the help text.
 Instead, `error: option -l not recognized`
 Also, `build_ext` accepts the switches of the commands `build_src` and
 `config` which is slightly confusing.

 For `build_clib`, there appears to be no way to pass the parameters `-I`
 and `-L`: the parameters from `config` are ignored, and `build_clib`
 doesn't accept them.

 For `config_fc --fcompiler=gnu95`, the parameters `--noopt`, `--noarch`
 and `--debug` appear to have no effect on the resulting compiler flags
 used, I always get `-O3 -funroll-loops -mmmx -m3dnow -msse`

 The above occurs on the following setup.py, which AFAIK is correct
 {{{
 #!/usr/bin/env python

 from numpy.distutils.misc_util import Configuration

 def configuration(parent_package='', top_path=None):
     config = Configuration('xxx', parent_package, top_path,
                            package_path='xxx',
                            )

     config.add_library('a', sources=['xxx/a.c'])
     config.add_extension('b', sources=['xxx/b.c'], libraries=['a'])
     config.add_library('c', sources=['xxx/c.f90'])
     return config

 if __name__ == "__main__":
     from numpy.distutils.core import setup
     setup(**configuration(top_path='').todict())
 }}}

 I think I had also some problems with the --compiler parameter on Windows
 (needed to specify it multiple times both for config, build_clib and
 build_ext), but I'll need to verify this later.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/539>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list