[SciPy-dev] PATCH: scipy_distutils/system_info.py

David M. Cooke cookedm at physics.mcmaster.ca
Mon May 27 15:52:24 EDT 2002


At some point, Pearu Peterson <pearu at cens.ioc.ee> wrote:

> On Mon, 27 May 2002, David M. Cooke wrote:
>
>> At some point, Pearu Peterson <pearu at cens.ioc.ee> wrote:
>> 
>> > Hi,
>> >
>> > Regarding this patch I have made the following changes.
>> >
>> [...]
>> > Dropped using 'extra_objects' as it was buggy from the start and unified
>> > hooks for static (.a) and dynamic (.so) libriaries.
>> [...]
>> > Renamed static_first to search_static_first and set its default value to
>> > 0. If someone really needs it, let me know. Otherwise search_static_first
>> > hooks will be removed in future. I find it quite useless because systems
>> > prefer shared libraries to static libraries (if they are in the same
>> > directory) and Python extension modules are always shared libraries
>> > anyway and I don't believe in speed improvement when linking against
>> > static libraries in this situation.
>> 
>> Ok, I looked over your changes and they look ok. But I have one
>> quibble: the use of shortest_path(). If there are two copies of a
>> library 'libx.so' in different directories, say /usr/local/lib and
>> /opt/lib,
>
> Note that this situation is not possible because lib_dir in self._lib_list
> is always a string containing the name of a directory. So, shortest_path
> is used to return actually the shortest basename as the directory is
> always the same. To avoid breaking these conditions in future, I have
> added
>   assert type(lib_dir) is type('')
> to self._lib_list method. Is that ok now?

All right. It's just that it's somewhat deceptive to call
shortest_path(), which (as written) doesn't take into account the
preferred ordering. I suppose now I worried more about the look of the
code :-)

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm at physics.mcmaster.ca



More information about the SciPy-Dev mailing list