# HG changeset patch # User Pascal Quantin # Date 2011-11-20 18:14:36 # Node ID 9926aab3d0b55ac5f1d9f8086ae0ddc4a312b987 # Parent e6519c6284542eee8664b6ebf9c0350630c1b91b setup: fix py2exe generation broken by c3a6ec304055 (issue3116) Py2exe is patching default distutils Distribution class. This patch ensures that the right one is taken when calling hgdist class. diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -121,6 +121,8 @@ def hasfunction(cc, funcname): try: import py2exe py2exeloaded = True + # import py2exe's patched Distribution class + from distutils.core import Distribution except ImportError: py2exeloaded = False