Commits

Jason R. Coombs  committed 719910d

Updated gen_py exception to use attribute of win32com rather than infer the location of gen_py

  • Participants
  • Parent commits 192bc08
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

File setuptools/sandbox.py

     _EXCEPTIONS = []
 
 try:
-	win32com_pkg = os.path.dirname(__import__('win32com').__file__)
-	gen_py_pkg = os.path.join(win32com_pkg, 'gen_py')
-	_EXCEPTIONS.append(gen_py_pkg)
+	import win32com
+	_EXCEPTIONS.append(win32com.__gen_path__)
 except ImportError:
 	# it appears pywin32 is not installed, so no need to exclude.
 	pass
 except AttributeError:
-	# unexpected error getting __file__ from win32com
+	# it appears __gen_path__ is not available, so fail silently
 	pass
 
 class DirectorySandbox(AbstractSandbox):