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

Maciej Fijalkowski fijall at gmail.com
Wed Feb 24 21:15:22 CET 2010


On Wed, Feb 24, 2010 at 11:17 AM, Glyph Lefkowitz
<glyph at twistedmatrix.com> wrote:
>
> On Feb 23, 2010, at 2:10 PM, Tarek Ziadé wrote:
>
>> On Tue, Feb 23, 2010 at 1:50 PM, Maciej Fijalkowski <fijall at gmail.com> wrote:
>>> Hello.
>>>
>>> I would like to have a feature on platform module (or sys or
>>> somewhere) that can tell distutils or distutils2 that this platform
>>> (be it PyPy or Jython) is not able to compile any C module. The
>>> purpose of this is to make distutils bail out in more reasonable
>>> manner than a compilation error in case this module is not going to
>>> work on anything but CPython.
>>>
>>> What do you think?
>>
>> +1
>>
>> I think we could have a global variable in sys, called "dont_compile",
>> distutils would look at
>> before it tris to compile stuff, exactly like how it does for pyc file
>> (sys.dont_write_bytecode)
>
> Every time somebody says "let's have a global variable", God kills a kitten.

I't not a global *variable*, it's a global *constant*, unlike
dont_write_bytecode.

> Similarly, functionally speaking this API is a good idea, but running the C compiler is distutils' job.   Therefore any API which describes this functionality should be close to distutils itself.

We're talking here about a way how interpreter can tell distutils what
it can and what it can't do. Other option would be to modify distutils
shipped with other python implementations, but that's a bit against
goals of having a unified stdlib.

Cheers,
fijal


More information about the Python-Dev mailing list