Patchwork D12276: setup: inline now-constant list

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 3:45 p.m.
Message ID <differential-rev-PHID-DREV-4m74dgggpkaos6xgaqtj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50615/
State New
Headers show

Comments

phabricator - March 2, 2022, 3:45 p.m.
durin42 created this revision.
durin42 added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This varied when we supported Python 2.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: durin42, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -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