[NumPy-Tickets] [NumPy] #1601: distutils/ccompiler.py:68 UnicodeEncodeError on Python 3.2

NumPy Trac numpy-tickets@scipy....
Wed Mar 2 21:32:50 CST 2011


#1601: distutils/ccompiler.py:68 UnicodeEncodeError on Python 3.2
-----------------------------+----------------------------------------------
 Reporter:  srid             |       Owner:  cdavid      
     Type:  defect           |      Status:  needs_review
 Priority:  normal           |   Milestone:  2.0.0       
Component:  numpy.distutils  |     Version:  devel       
 Keywords:                   |  
-----------------------------+----------------------------------------------

Comment(by srid):

 Hmm, actually I was wrong. I seem to have already worked around this issue
 with the following (hackish) patch:

 Index: numpy-1.5.0/numpy/distutils/ccompiler.py
 ===================================================================
 --- numpy-1.5.0.orig/numpy/distutils/ccompiler.py       2010-08-21
 22:08:35.000000000 -0700
 +++ numpy-1.5.0/numpy/distutils/ccompiler.py    2010-09-10
 17:32:45.000000000 -0700
 @@ -65,7 +65,7 @@
      if s:
          if is_sequence(cmd):
              cmd = ' '.join(list(cmd))
 -        print(o)
 +        print(o.encode('utf8') if sys.version_info[0] >= 3 else o)
          if re.search('Too many open files', o):
              msg = '\nTry rerunning setup command until build succeeds.'
          else:

 I suppose this ticket can be closed anyway.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1601#comment:4>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list