] get_version = lambda: "%s-win32" % (_get_version(), ) # Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will # not bitch about non-numeric version RE_NUMBER = re.compile(r'v?([0-9]+).*') extract_number = lambda x : RE_NUMBER.match(x).group(1) if \ RE_NUMBER.match(x) else "0" win32version = lambda x: ".".join( [extract_number(i) for i in x.split(".")[0:4]]) Freezer._AddVersionResource = lambda self, filename : \ stamp(filename, VersionInfo( win32version(self.metadata.version), comments = self.metadata.long_description, description = self.metadata.description, company = self.metadata.author, product = self.metadata.name )) setup(name="Syncthing GTK", author="Kozec", version=get_version(), description="Windows port of Syncthing GTK", options=dict(build_exe=dict(compressed=False, includes=["gi"], packages=["gi"], include_files=include_files), ), executables=executables) if 'build' in sys.argv:
get_version = lambda: "%s-win32" % (_get_version(), ) # Monkey-patch _AddVersionResource in cx_Freeze so win32verstamp will # not bitch about non-numeric version RE_NUMBER = re.compile(r'v?([0-9]+).*') extract_number = lambda x : RE_NUMBER.match(x).group(1) if \ RE_NUMBER.match(x) else "0" win32version = lambda x: ".".join( [extract_number(i) for i in x.split(".")[0:4]]) Freezer._AddVersionResource = lambda self, exe : \ stamp(exe.targetName, VersionInfo( win32version(self.metadata.version), comments = self.metadata.long_description, description = self.metadata.description, company = self.metadata.author, product = self.metadata.name, copyright = exe.copyright, trademarks = exe.trademarks )) setup(name="Syncthing GTK", author="Kozec", version=get_version(), description="Windows port of Syncthing GTK", options=dict(build_exe=dict(includes=["gi"], packages=["gi", "bcrypt", "cffi"], include_files=include_files), ), executables=executables) if 'build' in sys.argv: