Skip to content

Commit bde6417

Browse files
authored
Merge pull request #319 from effigies/mnt/py2exe-post-distutils
ENH: Prepare for py2exe dropping distutils support
2 parents f30484e + 388190f commit bde6417

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cmdclass.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ def run(self):
160160
del cmds["build_py"]
161161

162162
if 'py2exe' in sys.modules: # py2exe enabled?
163-
from py2exe.distutils_buildexe import py2exe as _py2exe
163+
try:
164+
from py2exe.setuptools_buildexe import py2exe as _py2exe
165+
except ImportError:
166+
from py2exe.distutils_buildexe import py2exe as _py2exe
164167

165168
class cmd_py2exe(_py2exe):
166169
def run(self):

0 commit comments

Comments
 (0)