[Rpm-maint] [PATCH 01/15] Generalize python configuration code to support both Python 2.* and Python 3.*

Panu Matilainen pmatilai at redhat.com
Mon Oct 19 07:39:49 UTC 2009


On Sat, 17 Oct 2009, David Malcolm wrote:

> On Fri, 2009-10-16 at 20:05 +0300, Ville Skyttä wrote:
>> On Thursday 15 October 2009, David Malcolm wrote:
>> 
>> >  +    WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; 
>> import sys; sys.stdout.write("%s\n" % get_python_inc())'` 
>> 
>> I think the last statement could be just "sys.stdout.write(get_python_inc())", 
>> no need for the newline.
> Thanks; yes, that's cleaner.  I was trying to maintain the newline
> implicitly-generated by "print", but it gets thrown away outside the
> python code.

Yup, for these purposes the newline makes no difference. Applied now in 
HEAD as per Ville's suggestion and also changed the various macros using 
python's print to use sys.stdout.write() instead.

 	- Panu -


More information about the Rpm-maint mailing list