From: <th...@us...> - 2013-07-02 05:53:59
|
Revision: 736 http://sourceforge.net/p/py2exe/svn/736 Author: theller Date: 2013-07-02 05:53:55 +0000 (Tue, 02 Jul 2013) Log Message: ----------- Remove postinstall script (doesn't make much sense, and doesn't work with 64-bit bdist_wininst). 2to3 changes. Modified Paths: -------------- trunk/py2exe/setup.py trunk/py2exe/zipextimporter.py Removed Paths: ------------- trunk/py2exe/py2exe_postinstall.py Deleted: trunk/py2exe/py2exe_postinstall.py =================================================================== --- trunk/py2exe/py2exe_postinstall.py 2013-06-30 18:03:08 UTC (rev 735) +++ trunk/py2exe/py2exe_postinstall.py 2013-07-02 05:53:55 UTC (rev 736) @@ -1,8 +0,0 @@ -"""py2exe is now installed on your machine. - -There are some samples in the 'samples' subdirectory.""" - -import sys - -if len(sys.argv) == 2 and sys.argv[1] == "-install": - print __doc__ Modified: trunk/py2exe/setup.py =================================================================== --- trunk/py2exe/setup.py 2013-06-30 18:03:08 UTC (rev 735) +++ trunk/py2exe/setup.py 2013-07-02 05:53:55 UTC (rev 736) @@ -41,7 +41,7 @@ from distutils.errors import * if sys.version_info < (2, 3): - raise DistutilsError, "This package requires Python 2.3 or later" + raise DistutilsError("This package requires Python 2.3 or later") # Some nasty hacks to ensure all our targets are built with a manifest that # references the CRT manifest (which the msvc9compiler implementation @@ -77,7 +77,7 @@ def __init__(self, *args, **kw): # Add a custom 'target_desc' option, which matches CCompiler # (is there a better way? - if kw.has_key("target_desc"): + if "target_desc" in kw: self.target_desc = kw['target_desc'] del kw['target_desc'] else: @@ -111,10 +111,9 @@ for inter in self.interpreters: sources = inter.sources if sources is None or type(sources) not in (type([]), type(())): - raise DistutilsSetupError, \ - ("in 'interpreters' option ('%s'), " + + raise DistutilsSetupError(("in 'interpreters' option ('%s'), " + "'sources' must be present and must be " + - "a list of source filenames") % inter.name + "a list of source filenames") % inter.name) sources = list(sources) fullname = self.get_exe_fullname(inter.name) @@ -202,8 +201,8 @@ def get_exe_filename (self, inter_name): ext_path = string.split(inter_name, '.') if self.debug: - return apply(os.path.join, ext_path) + '_d' - return apply(os.path.join, ext_path) + return os.path.join(*ext_path) + '_d' + return os.path.join(*ext_path) def setup_compiler(self): # This method *should* be available separately in build_ext! @@ -302,7 +301,7 @@ if not self.dry_run: try: os.remove(name) - except OSError, details: + except OSError as details: self.warn("Could not remove file: %s" % details) if os.path.splitext(name)[1] == '.py': # Try to remove .pyc and -pyo files also @@ -319,7 +318,7 @@ if not self.dry_run: try: os.rmdir(name) - except OSError, details: + except OSError as details: self.warn("Are there additional user files?\n"\ " Could not remove directory: %s" % details) else: @@ -515,7 +514,6 @@ libraries=["imagehlp"]), ], py_modules = ["zipextimporter"], - scripts = ["py2exe_postinstall.py"], interpreters = interpreters, packages=['py2exe', 'py2exe.resources', Modified: trunk/py2exe/zipextimporter.py =================================================================== --- trunk/py2exe/zipextimporter.py 2013-06-30 18:03:08 UTC (rev 735) +++ trunk/py2exe/zipextimporter.py 2013-07-02 05:53:55 UTC (rev 736) @@ -65,7 +65,7 @@ def load_module(self, fullname): verbose = _memimporter.get_verbose_flag() - if sys.modules.has_key(fullname): + if fullname in sys.modules: mod = sys.modules[fullname] if verbose: sys.stderr.write("import %s # previously loaded from zipfile %s\n" % (fullname, self.archive)) @@ -92,7 +92,7 @@ if verbose: sys.stderr.write("import %s # loaded from zipfile %s\n" % (fullname, mod.__file__)) return mod - raise zipimport.ZipImportError, "can't find module %s" % fullname + raise zipimport.ZipImportError("can't find module %s" % fullname) def __repr__(self): return "<%s object %r>" % (self.__class__.__name__, self.archive) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |