Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-11-18 14:16:00


Boris Gubenko wrote:
> David Abrahams wrote:
>> Yeah; isn't there a function in os.jam that lets you get that value?
>
> I'm not sure what function you mean. I can use 'os.platform' instead of
> 'modules.peek : OSPLAT' (I wish I used it in the first place).
>
> Is 'os.platform' the recommended way to determine the platform or there
> is a better way?

As your goal is to figure out the suffix (extension), you can ask python
for that directly, since python clearly needs to know what filenames to
look for when importing modules.

LIBEXT=`$PYTHON -c "from distutils import sysconfig; print
sysconfig.get_config_var('SO')" | tr -d "\r"`

...is what I do in my configure.ac script.

FWIW,
                Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk