Mercurial > hg
comparison setup.py @ 43676:6a5dc4d767a0
setup: use bytes for assumed python version
Caught by PyOxidizer when hacking on Windows.
# skip-blame for b'' prefixing
Differential Revision: https://phab.mercurial-scm.org/D7443
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 16 Nov 2019 11:48:47 -0500 |
parents | 666441b649e4 |
children | 52e4bfebc4ba |
comparison
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) |