[SciPy-dev] scipy_distutils/*_info.py files
eric
eric at scipy.org
Mon Feb 18 12:04:51 EST 2002
> > It is not a very important matter but may be somebody (Eric ?) had a
> > vision on this (unified specification,etc) that we should try to follow.
>
> Why not have a generic SystemInfo class which all instantiate?
> Something like (bare pseudocode):
>
> class SystemInfo:
> def __init__(self,what_I_need_to_find):
> ...
>
> def get_info(self):
> ....
> return dict_with_info
>
>
> Then you could do:
>
> x11_info = SystemInfo(lib = 'X11',...)
> atlas_info = SystemInfo(lib = 'atlas',...)
The idea of a class is good. I think the specific cases are special enough that they should be sub-classes instead of variables handed in so that:
class system_info:
...
def get_info(self):
...
def search_local(self):
""" Search system for directories. """
def download_from_remote(self):
""" Some provision for grabbing libraries from remote locations
like scipy.org if the person wants this to happen.
"""
class atlas_info(system_info):
""" Special cased to handle atlas specific stuff
"""
>
> and so on. I know this is the barest, roughest of sketches. But hopefully my
> point is clear. The advantage of this would be to have a unified interface
> both for specifying what one is looking for (files, directories, libraries,
> versions, etc.) and for the format of the output.
>
> I think it would be worth doing it that way as knowing what's installed in a
> system is a fairly common and generic problem.
Agreed. As long as we don't get in the business of trying to write autoconf. :-)
eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20020218/fc7e87c8/attachment.html>
More information about the SciPy-Dev
mailing list