setup.py
changeset 43676 6a5dc4d767a0
parent 43675 666441b649e4
child 43678 52e4bfebc4ba
equal deleted inserted replaced
43675:666441b649e4 43676:6a5dc4d767a0
   740             log.warn(
   740             log.warn(
   741                 'could not determine Python DLL filename; assuming pythonXY'
   741                 'could not determine Python DLL filename; assuming pythonXY'
   742             )
   742             )
   743 
   743 
   744             hv = sys.hexversion
   744             hv = sys.hexversion
   745             pythonlib = 'python%d%d' % (hv >> 24, (hv >> 16) & 0xFF)
   745             pythonlib = b'python%d%d' % (hv >> 24, (hv >> 16) & 0xFF)
   746 
   746 
   747         log.info('using %s as Python library name' % pythonlib)
   747         log.info('using %s as Python library name' % pythonlib)
   748         with open('mercurial/hgpythonlib.h', 'wb') as f:
   748         with open('mercurial/hgpythonlib.h', 'wb') as f:
   749             f.write(b'/* this file is autogenerated by setup.py */\n')
   749             f.write(b'/* this file is autogenerated by setup.py */\n')
   750             f.write(b'#define HGPYTHONLIB "%s"\n' % pythonlib)
   750             f.write(b'#define HGPYTHONLIB "%s"\n' % pythonlib)