[Python-Dev] Platform extension for distutils on other interpreters than CPython

Nick Coghlan ncoghlan at gmail.com
Thu Feb 25 13:29:03 CET 2010


Maciej Fijalkowski wrote:
> On Wed, Feb 24, 2010 at 6:35 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> Tarek Ziadé wrote:
>>> That makes me wonder : why don't we have a sys.implementation variable ?
>>> (cython/jython/pypi), since we can have several values for cython in
>>> sys.platform
> 
> Hello.
> 
> So I propose to have a sys.implementation which would have string
> representation like "CPython" or "Jython" and have a couple of extra
> attributes on that. I can think about a lot of attributes, however,
> couple comes to mind as obvious.
> 
> * supports_c_api - whether it can load and use CPython C modules
> * gc_strategy - probably equals "refcounting" or not, useful for some people
> * frame_introspection - This is mostly True for everybody except
> IronPython which has it as an optional command line argument. Might be
> useful to have it for some projects, unsure.
> 
> What do you think?

I think anything along these lines needs to be a PEP so that the
developers of the different implementations all get a chance to comment
and then have a firm standard to code to afterwards :)

Christian was going to write one in the PEP 370 context, so it's worth
following up with him to see if he ever got around to drafting anything.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list