Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def finalize_options(self):
py2exe.build_exe.py2exe.finalize_options(self)
if self.makensis is None:
try:
import win32api
self.makensis = win32api.FindExecutable('makensis')
except:
# Default path for makensis. This is where it gets
# installed by default.
self.makensis = os.path.join(os.environ['ProgramFiles'], 'NSIS\\makensis')