Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
form = HelloApp()
print "form created"
app = WinForms.Application
print "app referenced"
app.Run(form)
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise CalledProcessError(retcode, cmd, output=output)
return output
if __name__ == "__main__":
setup(name="pythonnet",
ext_modules=[
Extension("clr", sources=[])
],
cmdclass = {
"build_ext" : PythonNET_BuildExt
}
def build_extension(self, ext):
"""
Builds the .pyd file using msbuild or xbuild.
"""
if ext.name != "clr":
return super(PythonNET_BuildExt, self).build_extension(ext)
dest_file = self.get_ext_fullpath(ext.name)
dest_dir = os.path.dirname(dest_file)
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
defines = [
"PYTHON%d%s" % (sys.version_info[:2]),
"UCS2" if sys.maxunicode < 0x10FFFF else "UCS4",
]
if CONFIG == "Debug":
defines.extend(["DEBUG", "TRACE"])
cmd = [
_xbuild,