[Python-Dev] First draft of "sysconfig"
ziade.tarek at gmail.com
Thu Dec 17 10:55:52 CET 2009
On Tue, Dec 15, 2009 at 6:59 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Tarek wrote:
>> How would you use it when a list is returned ? Can you provide a few
>> examples where
>> the code wants to know the default architecture for the current platform ?
> The consumer could enumerate over it and then do whatever they were doing
> w/ the platform multiple times. If an earlier one succeeds at what
> they're attempting to do then they're done. If there's no "success", lets
> say they're appending something to sys.path, then they'd do it for all
> elements in the sequence.
get_platform is currently used 1/ by Distutils' build command to
define the default platform name
to build from (and there's an option to override it : --plat-name), 2/
by site.py to add the build dir of Python in case we are running from
For 1/, build allows cross-platform building only if the user is under
it'll throw an error. IOW, this api is used to know what is the
*current* platform, even if there are some (tiny) ways to work for
"other" platforms. 2/ was meant to be dropped at some point (see
http://bugs.python.org/issue586680) and very CPython specific I guess.
I am not sure, but in Jython/IronPython, do you guys have a "default"
if so, returning that default in get_platform() would work.
> It's not an absolute requirement or anything like that - it just jumped
> out at me because IronPython and Jython do have multiple platforms
> which could be relevant at one time.
Sure, and that's why I have asked feedback from IrontPython/Jython people,
Thanks for that.
Tarek Ziadé | http://ziade.org
More information about the Python-Dev