Patchwork D7443: setup: use bytes for assumed python version

login
register
mail settings
Submitter phabricator
Date Nov. 16, 2019, 5:29 p.m.
Message ID <differential-rev-PHID-DREV-moabsz7mognhuhwoy65x-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43302/
State Superseded
Headers show

Comments

phabricator - Nov. 16, 2019, 5:29 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Caught by PyOxidizer when hacking on Windows.
  
  1. skip-blame for b'' prefixing

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7443

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -742,7 +742,7 @@ 
             )
 
             hv = sys.hexversion
-            pythonlib = 'python%d%d' % (hv >> 24, (hv >> 16) & 0xFF)
+            pythonlib = b'python%d%d' % (hv >> 24, (hv >> 16) & 0xFF)
 
         log.info('using %s as Python library name' % pythonlib)
         with open('mercurial/hgpythonlib.h', 'wb') as f: