Show More
@@ -631,8 +631,14 b' class buildhgexe(build_ext):' | |||||
631 | with open('mercurial/hgpythonlib.h', 'wb') as f: |
|
631 | with open('mercurial/hgpythonlib.h', 'wb') as f: | |
632 | f.write(b'/* this file is autogenerated by setup.py */\n') |
|
632 | f.write(b'/* this file is autogenerated by setup.py */\n') | |
633 | f.write(b'#define HGPYTHONLIB "%s"\n' % pythonlib) |
|
633 | f.write(b'#define HGPYTHONLIB "%s"\n' % pythonlib) | |
|
634 | ||||
|
635 | macros = None | |||
|
636 | if sys.version_info[0] >= 3: | |||
|
637 | macros = [('_UNICODE', None), ('UNICODE', None)] | |||
|
638 | ||||
634 | objects = self.compiler.compile(['mercurial/exewrapper.c'], |
|
639 | objects = self.compiler.compile(['mercurial/exewrapper.c'], | |
635 |
output_dir=self.build_temp |
|
640 | output_dir=self.build_temp, | |
|
641 | macros=macros) | |||
636 | dir = os.path.dirname(self.get_ext_fullpath('dummy')) |
|
642 | dir = os.path.dirname(self.get_ext_fullpath('dummy')) | |
637 | self.hgtarget = os.path.join(dir, 'hg') |
|
643 | self.hgtarget = os.path.join(dir, 'hg') | |
638 | self.compiler.link_executable(objects, self.hgtarget, |
|
644 | self.compiler.link_executable(objects, self.hgtarget, |
General Comments 0
You need to be logged in to leave comments.
Login now