[Python-porting] Python 2/3 compatible distutils installation?

Éric Araujo merwok at netwok.org
Thu May 17 02:13:30 CEST 2012


Le 16/05/2012 19:34, Barry Warsaw a écrit :
> On May 16, 2012, at 03:16 PM, Chris Jerdonek wrote:
>> What causes the install process to byte-compile the files?
> That's the question. :)  By which I mean, the files get byte compiled on
> installation, and I've tried various things to have it ignore _compat2x.py
> when installing in Python 3, but with no luck.

distutils does that.  As far as I know you can either disable
byte-compilation wholesale, or have it for all modules.  I don’t think
even a dirty hack like registering the _compat?.py files as package_data
would work, because the byte-compilation function is applied to the
whole build or install dir (but try it anyway, we never know).

See http://bugs.python.org/issue10530 for a distutils2 feature request
about this same use case.

Cheers


More information about the Python-porting mailing list