[Numpy-discussion] PR, extended site.cfg capabilities

Nick Papior Andersen nickpapior at gmail.com
Tue Feb 24 09:01:33 EST 2015


2015-02-24 14:56 GMT+01:00 Julian Taylor <jtaylor.debian at googlemail.com>:

> On 02/24/2015 02:31 PM, Julian Taylor wrote:
> > On 02/24/2015 02:16 PM, Nick Papior Andersen wrote:
> >> Dear all,
> >>
> >> I have initiated a PR-5597 <https://github.com/numpy/numpy/pull/5597>,
> >> which enables the reading of new flags from the site.cfg file.
> >> @rgommers requested that I posted some information on this site,
> >> possibly somebody could test it on their setup.
> >
> > I do not fully understand the purpose of these changes. Can you give
> > some more detailed use cases?
>
> I think I understand better now, so this is intended as a site.cfg
> equivalent (and possibly more portable) variant of the environment
> variables that control these options?
> e.g. runtime_lib_dirs would be equivalent to LD_RUN_PATH env. variable
> and build_ext --rpath
> and the compile_extra_opts equivalent to the OPT env variable?
>
> Yes, but with the flexibility of each library (section). Instead of
"globally" using the env's.
And also that the site.cfg file is used in scipy which does not force the
user to build numpy AND scipy with build_ext --rpath, etc.

>
> >
> >>
> >> So the PR basically enables reading these extra options in each section:
> >> runtime_library_dirs : Add runtime library directories to the shared
> >> libraries (overrides the dreaded LD_LIBRARY_PATH)
> >
> > LD_LIBRARY_PATH should not be used during compilation, this is a runtime
> > flag that numpy.distutils has no control over.
> > Can you explain in more detail what you intend to do with this flag?
> >
> >> extra_compile_args: Adds extra compile flags to the compilation
> >
> > extra flags to which compilation?
> > site.cfg lists libraries that already are compiled. The only influence
> > compiler flags could have is for header only libraries that profit from
> > some flags. But numpy has no support for such libraries currently. E.g.
> > cblas.h (which is just a header with signatures) is bundled with numpy.
> > I guess third parties may make use of this, an example would be good.
> >
> >> extra_link_args: Adds extra flags when linking to libraries
> >
> > This flag may be useful.
> > It could be used to pass options required during linking, like
> > -Wl,--no-as-needed that is sometimes needed to link with gsl.
> > Possibly also useful for link time optimizations.
> >
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Kind regards Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150224/d54b1074/attachment.html>


More information about the NumPy-Discussion mailing list