当前位置: 首页>>代码示例>>Python>>正文


Python py2exe.run函数代码示例

本文整理汇总了Python中py2exe.build_exe.py2exe.run函数的典型用法代码示例。如果您正苦于以下问题:Python run函数的具体用法?Python run怎么用?Python run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了run函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

        def run(self):
            
            import zipfile
            # initialize variables and create appropriate directories in 'buid' directory
            # please don't change 'dist_dir' in setup()
             
            orig_dist_dir=self.dist_dir
            self.mkpath(orig_dist_dir)
            zip_filename=os.path.join(orig_dist_dir, '%s-%s-win32.zip' % (self.distribution.metadata.name, self.distribution.metadata.version,))
            #zip_filename_last=os.path.join(orig_dist_dir, '%s-%s-win32.zip' % (self.distribution.metadata.name, 'last',))
            bdist_base=self.get_finalized_command('bdist').bdist_base
            dist_dir=os.path.join(bdist_base, '%s-%s' % (self.distribution.metadata.name, self.distribution.metadata.version, ))
            self.dist_dir=dist_dir
            print('dist_dir is', dist_dir)

            # let py2exe do it's work.
            py2exe.run(self)
            
            # remove zipfile if exists
            if os.path.exists(zip_filename):
                os.unlink(zip_filename)
            
            # create the zipfile
            print('Building zip file', zip_filename)
            zfile=zipfile.ZipFile(zip_filename, "w", zipfile.ZIP_DEFLATED)
            for root, dirs, files in os.walk(dist_dir):
                for f in files:
                    filename=os.path.join(root, f)
                    zfile.write(filename, os.path.relpath(filename, bdist_base))
                    
            # zfile.writestr('EGG-INFO/PKG-INFO', 'This file is required by PyPI to allow upload') # but I don't want upload
            zfile.close()
开发者ID:abdelhai,项目名称:pyzmail,代码行数:32,代码来源:setup.py

示例2: run

 def run(self):
     py2exe.run(self)
     script = NSISScript()
     script.create()
     print "*** compiling the NSIS setup script***"
     script.compile()
     print "*** DONE ***"
开发者ID:Giladx,项目名称:syncplay,代码行数:7,代码来源:buildPy2exe.py

示例3: run

        def run(self):
            generate_file('scripts/picard.py2exe.in', 'scripts/picard', {})
            self.distribution.data_files.append(
                ("", ["discid.dll", "fpcalc.exe", "msvcr90.dll", "msvcp90.dll"]))
            for locale in self.distribution.locales:
                self.distribution.data_files.append(
                    ("locale/" + locale[1] + "/LC_MESSAGES",
                     ["build/locale/" + locale[1] + "/LC_MESSAGES/" + locale[0] + ".mo"]))
            self.distribution.data_files.append(
                ("imageformats", [find_file_in_path("PyQt4/plugins/imageformats/qgif4.dll"),
                                  find_file_in_path("PyQt4/plugins/imageformats/qjpeg4.dll"),
                                  find_file_in_path("PyQt4/plugins/imageformats/qtiff4.dll")]))
            self.distribution.data_files.append(
                ("accessible", [find_file_in_path("PyQt4/plugins/accessible/qtaccessiblewidgets4.dll")]))
            self.distribution.data_files.append(
                ("plugins", ["contrib/plugins/discnumber.py",
                             "contrib/plugins/classicdiscnumber.py",
                             "contrib/plugins/titlecase.py",
                             "contrib/plugins/featartist.py"]))

            py2exe.run(self)
            print "*** creating the NSIS setup script ***"
            pathname = "installer\picard-setup.nsi"
            generate_file(pathname + ".in", pathname,
                          {'name': 'MusicBrainz Picard',
                           'version': __version__,
                           'description': 'The next generation MusicBrainz tagger.',
                           'url': 'http://musicbrainz.org/doc/MusicBrainz_Picard', })
            print "*** compiling the NSIS setup script ***"
            subprocess.call([self.find_nsis(), pathname])
开发者ID:queer1,项目名称:picard,代码行数:30,代码来源:setup.py

示例4: run

        def run(self):
            generate_file('scripts/picard.py2exe.in', 'scripts/picard', {})
            self.distribution.data_files.append(
                ("", ["discid.dll", "fpcalc.exe", "msvcr90.dll", "msvcp90.dll"]))
            for locale in self.distribution.locales:
                self.distribution.data_files.append(
                    ("locale/" + locale[1] + "/LC_MESSAGES",
                     ["build/locale/" + locale[1] + "/LC_MESSAGES/" + locale[0] + ".mo"]))
            self.distribution.data_files.append(
                ("imageformats", [find_file_in_path("PyQt4/plugins/imageformats/qgif4.dll"),
                                  find_file_in_path("PyQt4/plugins/imageformats/qjpeg4.dll"),
                                  find_file_in_path("PyQt4/plugins/imageformats/qtiff4.dll")]))
            self.distribution.data_files.append(
                ("accessible", [find_file_in_path("PyQt4/plugins/accessible/qtaccessiblewidgets4.dll")]))
            self.distribution.data_files.append(
                ("plugins", ["contrib/plugins/discnumber.py",
                             "contrib/plugins/classicdiscnumber.py",
                             "contrib/plugins/titlecase.py",
                             "contrib/plugins/featartist.py"]))

            py2exe.run(self)
            print "*** creating the NSIS setup script ***"
            pathname = "installer\picard-setup.nsi"
            generate_file(pathname + ".in", pathname,
                          {'name': 'MusicBrainz Picard',
                           'version': __version__,
                           'description': 'The next generation MusicBrainz tagger.',
                           'url': 'http://musicbrainz.org/doc/MusicBrainz_Picard',})
            print "*** compiling the NSIS setup script ***"
            from ctypes import windll
            operation = 'compile'
            res = windll.shell32.ShellExecuteA(0, operation, pathname, None, None, 0)
            if res < 32:
                raise RuntimeError, 'ShellExecute failed executing "%s %s", error %d' % (
                    operation, pathname, res)
开发者ID:kepstin,项目名称:picard,代码行数:35,代码来源:setup.py

示例5: run

 def run(self):
     py2exe.run(self)
     print('*** deleting unnecessary libraries and modules ***')
     pruneUnneededLibraries()
     print('*** copying qt plugins ***')
     copyQtPlugins(qt_plugins)
     script = NSISScript()
     script.create()
     print("*** compiling the NSIS setup script ***")
     script.compile()
     print("*** DONE ***")
开发者ID:Syncplay,项目名称:syncplay,代码行数:11,代码来源:buildPy2exe.py

示例6: run

    def run(self):
        # First, let py2exe do it's work.
        py2exe.run(self)

        lib_dir = self.lib_dir
        dist_dir = self.dist_dir

        # create the Installer, using the files py2exe has created.
        script = InnoScript("ESSA-NL", lib_dir, dist_dir, self.windows_exe_files, self.lib_files)
        print "*** creating the inno setup script***"
        script.create()
        print "*** compiling the inno setup script***"
        script.compile()
开发者ID:Holzhauer,项目名称:ESSA-NL-Scripts,代码行数:13,代码来源:setup.py

示例7: run

    def run(self):
        # Make the gtkrc
        dir_path = os.path.join("dist", "etc", "gtk-2.0")
        try:
            os.makedirs(dir_path)
        except:
            pass
        gtkrc_f = open(os.path.join(dir_path, "gtkrc"), "w")
        gtkrc_f.write('gtk-theme-name = "MS-Windows"\n')
        gtkrc_f.write('gtk-icon-theme-name = "hicolor"\n')
        gtkrc_f.write("gtk-button-images = 1\n")
        gtkrc_f.close()

        build_exe.run(self)
开发者ID:umitproject,项目名称:network-inventory,代码行数:14,代码来源:umit_ni_py2exe.py

示例8: run

 def run (self):
     """Generate py2exe installer."""
     # First, let py2exe do it's work.
     py2exe_build.run(self)
     print("*** preparing the inno setup script ***")
     lib_dir = self.lib_dir
     dist_dir = self.dist_dir
     # create the Installer, using the files py2exe has created.
     script = InnoScript(lib_dir, dist_dir, self.windows_exe_files,
         self.console_exe_files, self.service_exe_files,
         self.comserver_files, self.lib_files)
     script.create()
     script.compile()
     script.sign()
开发者ID:dromaludaire,项目名称:dosage,代码行数:14,代码来源:setup.py

示例9: run

    def run(self):
        print
        print "#" * 80
        print "# Creating EXE"
        print "#" * 80
        print

        BuildExe.run(self)
        self.build_plugins()
        self.build_audits()

        print
        print "#" * 80
        print "# Packet manipulator is now installed"
        print "#" * 80
        print
开发者ID:Paulxia,项目名称:PacketManipulator,代码行数:16,代码来源:setup.py

示例10: run

    def run(self):
        # Clean up
        os.system("del /S /Q dist")
        # First, let py2exe do it's work.
        py2exe.run(self)

        lib_dir = self.lib_dir
        dist_dir = self.dist_dir
        comserver_files = self.comserver_files
        metadata = self.distribution.metadata

        # create the Installer, using the files py2exe has created.
        script = NSISScript(metadata, lib_dir, dist_dir, self.windows_exe_files, self.lib_files, comserver_files)
        print "*** creating the nsis script***"
        script.create()
        print "*** compiling the nsis script***"
        script.compile()
开发者ID:kpocha,项目名称:pyafipws,代码行数:17,代码来源:nsis.py

示例11: run

    def run(self):
        # First, let py2exe do it's work.
        py2exe.run(self)

        lib_dir = self.lib_dir
        dist_dir = self.dist_dir
        
        # create the Installer, using the files py2exe has created.
        script = InnoScript("Mordinator",
                            "DiploSoft",
                            lib_dir,
                            dist_dir,
                            self.windows_exe_files,
                            self.lib_files,
                            version = MORDINATOR_VERSION )
        print "*** creating the inno setup script***"
        script.create()
        print "*** compiling the inno setup script***"
        script.compile()
开发者ID:jikhanjung,项目名称:Mordinator,代码行数:19,代码来源:setup.py

示例12: run

	def run (self):
		if not os.path.exists ("win32-merger/pyacqua.exe"):
			print "You must compile the win32-merger"
			return
		print "**"
		print "** Remember to clean dist/ dir before running this"
		print "** Or at least to remove dist/list.xml"
		print "**"
		print "** Sleeping 5 seconds now..."
		time.sleep (5)
		print "**"
		print
		
		build_exe.run (self)
		
		print "Creating list.xml ..."
		
		os.chdir ("dist\\")
		xml = generate.UpdateXML ()
		xml.dump_tree_to_file (xml.create_dict_from_directory (), "list.xml")
		
		print "List created."
开发者ID:kucukkose,项目名称:py-acqua,代码行数:22,代码来源:win-setup.py

示例13: run

 def run(self):
     self._initialize_distribution()
     _py2exe.run(self)
开发者ID:dieterv,项目名称:pygtk2exe,代码行数:3,代码来源:build_exe.py

示例14: run

 def run(self):
     py2exe.run(self)
     date = time.strftime('%Y%m%d-%H%M')
     git_hash = subprocess.check_output(
         ['git', 'rev-parse', '--verify', '--short', 'HEAD'], shell=True)
     open('dist/VERSION', 'w').write('{}-{}'.format(date, git_hash))
开发者ID:euphoris,项目名称:another-springnote,代码行数:6,代码来源:setup.py

示例15: run

 def run(self):
     build_exe.run(self)
     self.finish_banner()
开发者ID:aregee,项目名称:network-scanner,代码行数:3,代码来源:py2exe_setup.py


注:本文中的py2exe.build_exe.py2exe.run函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。