D329: setup: Fix installing in a mingw environment
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7686cbb0ba41: setup: fix installing in a mingw environment (authored by glandium). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D329?vs=751=828 REVISION DETAIL https://phab.mercurial-scm.org/D329 AFFECTED FILES setup.py CHANGE DETAILS diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -784,11 +784,11 @@ from distutils import cygwinccompiler # the -mno-cygwin option has been deprecated for years -compiler = cygwinccompiler.Mingw32CCompiler +mingw32compilerclass = cygwinccompiler.Mingw32CCompiler class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler): def __init__(self, *args, **kwargs): -compiler.__init__(self, *args, **kwargs) +mingw32compilerclass.__init__(self, *args, **kwargs) for i in 'compiler compiler_so linker_exe linker_so'.split(): try: getattr(self, i).remove('-mno-cygwin') @@ -809,11 +809,11 @@ # effect. from distutils import msvccompiler -compiler = msvccompiler.MSVCCompiler +msvccompilerclass = msvccompiler.MSVCCompiler class HackedMSVCCompiler(msvccompiler.MSVCCompiler): def initialize(self): -compiler.initialize(self) +msvccompilerclass.initialize(self) # "warning LNK4197: export 'func' specified multiple times" self.ldflags_shared.append('/ignore:4197') self.ldflags_shared_debug.append('/ignore:4197') To: glandium, #hg-reviewers, quark Cc: durin42, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D329: setup: Fix installing in a mingw environment
glandium added a comment. 4.3.1 can't currently be installed with MINGW64 python currently because of this, so I'd say yes. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D329 To: glandium, #hg-reviewers, quark Cc: durin42, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D329: setup: Fix installing in a mingw environment
durin42 added a comment. Should we put this on stable? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D329 To: glandium, #hg-reviewers, quark Cc: durin42, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D329: setup: Fix installing in a mingw environment
glandium created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The addition, in https://phab.mercurial-scm.org/rHG9a4adc76c88a1a217983f051766b3009c0bca3aa, of a hack for the MSVC compiler class was overwriting the original class for the Mingw32CCompiler class, leading to an error when the HackedMingw32CCompiler is instantiated. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D329 AFFECTED FILES setup.py CHANGE DETAILS diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -784,11 +784,11 @@ from distutils import cygwinccompiler # the -mno-cygwin option has been deprecated for years -compiler = cygwinccompiler.Mingw32CCompiler +mingw32compilerclass = cygwinccompiler.Mingw32CCompiler class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler): def __init__(self, *args, **kwargs): -compiler.__init__(self, *args, **kwargs) +mingw32compilerclass.__init__(self, *args, **kwargs) for i in 'compiler compiler_so linker_exe linker_so'.split(): try: getattr(self, i).remove('-mno-cygwin') @@ -809,11 +809,11 @@ # effect. from distutils import msvccompiler -compiler = msvccompiler.MSVCCompiler +msvccompilerclass = msvccompiler.MSVCCompiler class HackedMSVCCompiler(msvccompiler.MSVCCompiler): def initialize(self): -compiler.initialize(self) +msvccompilerclass.initialize(self) # "warning LNK4197: export 'func' specified multiple times" self.ldflags_shared.append('/ignore:4197') self.ldflags_shared_debug.append('/ignore:4197') To: glandium, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel