changeset 48832:b07b034cf548

setup: inline now-constant list This varied when we supported Python 2. Differential Revision: https://phab.mercurial-scm.org/D12276
author Augie Fackler <augie@google.com>
date Wed, 02 Mar 2022 10:13:45 -0500
parents 40e35034eac8
children 64a8cdf4f327
files setup.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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