setup.py
branchstable
changeset 17246 bf5bb38bcc7c
parent 17121 d13f47c800fd
child 17606 318fb32b980e
equal deleted inserted replaced
17245:6e84171a61c8 17246:bf5bb38bcc7c
   340     description = 'compile hg.exe from mercurial/exewrapper.c'
   340     description = 'compile hg.exe from mercurial/exewrapper.c'
   341 
   341 
   342     def build_extensions(self):
   342     def build_extensions(self):
   343         if os.name != 'nt':
   343         if os.name != 'nt':
   344             return
   344             return
       
   345         if isinstance(self.compiler, HackedMingw32CCompiler):
       
   346             self.compiler.compiler_so = self.compiler.compiler # no -mdll
       
   347             self.compiler.dll_libraries = [] # no -lmsrvc90
   345         objects = self.compiler.compile(['mercurial/exewrapper.c'],
   348         objects = self.compiler.compile(['mercurial/exewrapper.c'],
   346                                          output_dir=self.build_temp)
   349                                          output_dir=self.build_temp)
   347         dir = os.path.dirname(self.get_ext_fullpath('dummy'))
   350         dir = os.path.dirname(self.get_ext_fullpath('dummy'))
   348         target = os.path.join(dir, 'hg')
   351         target = os.path.join(dir, 'hg')
       
   352         pythonlib = ("python%d%d" %
       
   353                (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
   349         self.compiler.link_executable(objects, target,
   354         self.compiler.link_executable(objects, target,
       
   355                                       libraries=[pythonlib],
   350                                       output_dir=self.build_temp)
   356                                       output_dir=self.build_temp)
   351 
   357 
   352 class hginstallscripts(install_scripts):
   358 class hginstallscripts(install_scripts):
   353     '''
   359     '''
   354     This is a specialization of install_scripts that replaces the @LIBDIR@ with
   360     This is a specialization of install_scripts that replaces the @LIBDIR@ with