setup: inline now-constant list
authorAugie Fackler <augie@google.com>
Wed, 02 Mar 2022 10:13:45 -0500
changeset 48832 b07b034cf548
parent 48831 40e35034eac8
child 48833 64a8cdf4f327
setup: inline now-constant list This varied when we supported Python 2. Differential Revision: https://phab.mercurial-scm.org/D12276
setup.py
--- a/setup.py	Wed Mar 02 10:13:09 2022 -0500
+++ b/setup.py	Wed Mar 02 10:13:45 2022 -0500
@@ -773,14 +773,10 @@
             f.write(b'/* this file is autogenerated by setup.py */\n')
             f.write(b'#define HGPYTHONLIB "%s"\n' % pythonlib)
 
-        macros = None
-        if sys.version_info[0] >= 3:
-            macros = [('_UNICODE', None), ('UNICODE', None)]
-
         objects = self.compiler.compile(
             ['mercurial/exewrapper.c'],
             output_dir=self.build_temp,
-            macros=macros,
+            macros=[('_UNICODE', None), ('UNICODE', None)],
         )
         self.compiler.link_executable(
             objects, self.hgtarget, libraries=[], output_dir=self.build_temp