diff --git a/src/cmdclass.py b/src/cmdclass.py index d2d9569d..da124ea0 100644 --- a/src/cmdclass.py +++ b/src/cmdclass.py @@ -160,7 +160,10 @@ def run(self): del cmds["build_py"] if 'py2exe' in sys.modules: # py2exe enabled? - from py2exe.distutils_buildexe import py2exe as _py2exe + try: + from py2exe.setuptools_buildexe import py2exe as _py2exe + except ImportError: + from py2exe.distutils_buildexe import py2exe as _py2exe class cmd_py2exe(_py2exe): def run(self):