setup.py
changeset 51848 3f0db3b6bf14
parent 51836 905bc9d0a149
child 51849 4dc1fc2b2f3a
equal deleted inserted replaced
51847:a3a9251c6081 51848:3f0db3b6bf14
  1652     # DiskStation boxes
  1652     # DiskStation boxes
  1653     class HackedMingw32CCompiler:
  1653     class HackedMingw32CCompiler:
  1654         pass
  1654         pass
  1655 
  1655 
  1656 
  1656 
  1657 if os.name == 'nt':
       
  1658     # Allow compiler/linker flags to be added to Visual Studio builds.  Passing
       
  1659     # extra_link_args to distutils.extensions.Extension() doesn't have any
       
  1660     # effect.
       
  1661     try:
       
  1662         # setuptools < 65.0
       
  1663         from distutils import msvccompiler
       
  1664     except ImportError:
       
  1665         from distutils import _msvccompiler as msvccompiler
       
  1666 
       
  1667     msvccompilerclass = msvccompiler.MSVCCompiler
       
  1668 
       
  1669     class HackedMSVCCompiler(msvccompiler.MSVCCompiler):
       
  1670         def initialize(self):
       
  1671             msvccompilerclass.initialize(self)
       
  1672             # "warning LNK4197: export 'func' specified multiple times"
       
  1673             self.ldflags_shared.append('/ignore:4197')
       
  1674             self.ldflags_shared_debug.append('/ignore:4197')
       
  1675 
       
  1676     msvccompiler.MSVCCompiler = HackedMSVCCompiler
       
  1677 
       
  1678 packagedata = {
  1657 packagedata = {
  1679     'mercurial': [
  1658     'mercurial': [
  1680         'configitems.toml',
  1659         'configitems.toml',
  1681         'locale/*/LC_MESSAGES/hg.mo',
  1660         'locale/*/LC_MESSAGES/hg.mo',
  1682         'dummycert.pem',
  1661         'dummycert.pem',