You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(31) |
Nov
(38) |
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(46) |
Feb
(2) |
Mar
(10) |
Apr
(13) |
May
(2) |
Jun
(14) |
Jul
(28) |
Aug
(3) |
Sep
(7) |
Oct
(8) |
Nov
(8) |
Dec
(11) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
(42) |
May
(1) |
Jun
(8) |
Jul
(4) |
Aug
(18) |
Sep
(38) |
Oct
(10) |
Nov
|
Dec
(7) |
2006 |
Jan
|
Feb
(8) |
Mar
(9) |
Apr
|
May
|
Jun
(6) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
(8) |
2007 |
Jan
(3) |
Feb
|
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
(17) |
May
(16) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(11) |
Dec
(1) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2013 |
Jan
(14) |
Feb
(14) |
Mar
|
Apr
|
May
(3) |
Jun
(10) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(8) |
Nov
|
Dec
|
2017 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <th...@us...> - 2013-01-10 19:00:18
|
Revision: 697 http://py2exe.svn.sourceforge.net/py2exe/?rev=697&view=rev Author: theller Date: 2013-01-10 19:00:09 +0000 (Thu, 10 Jan 2013) Log Message: ----------- Add some notes, and create the directory structure. Also copy mf.py from py2exe trunk. Added Paths: ----------- trunk/py3exe/py3exe/mf.py Copied: trunk/py3exe/py3exe/mf.py (from rev 694, trunk/py2exe/py2exe/mf.py) =================================================================== --- trunk/py3exe/py3exe/mf.py (rev 0) +++ trunk/py3exe/py3exe/mf.py 2013-01-10 19:00:09 UTC (rev 697) @@ -0,0 +1,809 @@ +"""Find modules used by a script, using introspection.""" +# This module should be kept compatible with Python 2.2, see PEP 291. + +from __future__ import generators +import dis +import imp +import marshal +import os +import sys +import types +import struct + +if hasattr(sys.__stdout__, "newlines"): + READ_MODE = "U" # universal line endings +else: + # remain compatible with Python < 2.3 + READ_MODE = "r" + +LOAD_CONST = chr(dis.opname.index('LOAD_CONST')) +IMPORT_NAME = chr(dis.opname.index('IMPORT_NAME')) +STORE_NAME = chr(dis.opname.index('STORE_NAME')) +STORE_GLOBAL = chr(dis.opname.index('STORE_GLOBAL')) +STORE_OPS = [STORE_NAME, STORE_GLOBAL] +HAVE_ARGUMENT = chr(dis.HAVE_ARGUMENT) + +# !!! NOTE BEFORE INCLUDING IN PYTHON DISTRIBUTION !!! +# To clear up issues caused by the duplication of data structures between +# the real Python modulefinder and this duplicate version, packagePathMap +# and replacePackageMap are imported from the actual modulefinder. This +# should be changed back to the assigments that are commented out below. +# There are also py2exe specific pieces at the bottom of this file. + + +# Modulefinder does a good job at simulating Python's, but it can not +# handle __path__ modifications packages make at runtime. Therefore there +# is a mechanism whereby you can register extra paths in this map for a +# package, and it will be honored. + +# Note this is a mapping is lists of paths. +#~ packagePathMap = {} +from modulefinder import packagePathMap + +# A Public interface +def AddPackagePath(packagename, path): + paths = packagePathMap.get(packagename, []) + paths.append(path) + packagePathMap[packagename] = paths + +#~ replacePackageMap = {} +from modulefinder import replacePackageMap + +# This ReplacePackage mechanism allows modulefinder to work around the +# way the _xmlplus package injects itself under the name "xml" into +# sys.modules at runtime by calling ReplacePackage("_xmlplus", "xml") +# before running ModuleFinder. + +def ReplacePackage(oldname, newname): + replacePackageMap[oldname] = newname + + +class Module: + + def __init__(self, name, file=None, path=None): + self.__name__ = name + self.__file__ = file + self.__path__ = path + self.__code__ = None + # The set of global names that are assigned to in the module. + # This includes those names imported through starimports of + # Python modules. + self.globalnames = {} + # The set of starimports this module did that could not be + # resolved, ie. a starimport from a non-Python module. + self.starimports = {} + + def __repr__(self): + s = "Module(%r" % (self.__name__,) + if self.__file__ is not None: + s = s + ", %r" % (self.__file__,) + if self.__path__ is not None: + s = s + ", %r" % (self.__path__,) + s = s + ")" + return s + +class ModuleFinder: + + def __init__(self, path=None, debug=0, excludes=[], replace_paths=[]): + if path is None: + path = sys.path + self.path = path + self.modules = {} + self.badmodules = {} + self.debug = debug + self.indent = 0 + self.excludes = excludes + self.replace_paths = replace_paths + self.processed_paths = [] # Used in debugging only + + def msg(self, level, str, *args): + if level <= self.debug: + for i in range(self.indent): + print " ", + print str, + for arg in args: + print repr(arg), + print + + def msgin(self, *args): + level = args[0] + if level <= self.debug: + self.indent = self.indent + 1 + self.msg(*args) + + def msgout(self, *args): + level = args[0] + if level <= self.debug: + self.indent = self.indent - 1 + self.msg(*args) + + def run_script(self, pathname): + self.msg(2, "run_script", pathname) + fp = open(pathname, READ_MODE) + stuff = ("", "r", imp.PY_SOURCE) + self.load_module('__main__', fp, pathname, stuff) + + def load_file(self, pathname): + dir, name = os.path.split(pathname) + name, ext = os.path.splitext(name) + fp = open(pathname, READ_MODE) + stuff = (ext, "r", imp.PY_SOURCE) + self.load_module(name, fp, pathname, stuff) + + def import_hook(self, name, caller=None, fromlist=None, level=-1): + self.msg(3, "import_hook", name, caller, fromlist, level) + parent = self.determine_parent(caller, level=level) + q, tail = self.find_head_package(parent, name) + m = self.load_tail(q, tail) + if not fromlist: + return q + if m.__path__: + self.ensure_fromlist(m, fromlist) + return None + + def determine_parent(self, caller, level=-1): + self.msgin(4, "determine_parent", caller, level) + if not caller or level == 0: + self.msgout(4, "determine_parent -> None") + return None + pname = caller.__name__ + if level >= 1: # relative import + if caller.__path__: + level -= 1 + if level == 0: + parent = self.modules[pname] + assert parent is caller + self.msgout(4, "determine_parent ->", parent) + return parent + if pname.count(".") < level: + raise ImportError, "relative importpath too deep" + pname = ".".join(pname.split(".")[:-level]) + parent = self.modules[pname] + self.msgout(4, "determine_parent ->", parent) + return parent + if caller.__path__: + parent = self.modules[pname] + assert caller is parent + self.msgout(4, "determine_parent ->", parent) + return parent + if '.' in pname: + i = pname.rfind('.') + pname = pname[:i] + parent = self.modules[pname] + assert parent.__name__ == pname + self.msgout(4, "determine_parent ->", parent) + return parent + self.msgout(4, "determine_parent -> None") + return None + + def find_head_package(self, parent, name): + self.msgin(4, "find_head_package", parent, name) + if '.' in name: + i = name.find('.') + head = name[:i] + tail = name[i+1:] + else: + head = name + tail = "" + if parent: + qname = "%s.%s" % (parent.__name__, head) + else: + qname = head + q = self.import_module(head, qname, parent) + if q: + self.msgout(4, "find_head_package ->", (q, tail)) + return q, tail + if parent: + qname = head + parent = None + q = self.import_module(head, qname, parent) + if q: + self.msgout(4, "find_head_package ->", (q, tail)) + return q, tail + self.msgout(4, "raise ImportError: No module named", qname) + raise ImportError, "No module named " + qname + + def load_tail(self, q, tail): + self.msgin(4, "load_tail", q, tail) + m = q + while tail: + i = tail.find('.') + if i < 0: i = len(tail) + head, tail = tail[:i], tail[i+1:] + mname = "%s.%s" % (m.__name__, head) + m = self.import_module(head, mname, m) + if not m: + self.msgout(4, "raise ImportError: No module named", mname) + raise ImportError, "No module named " + mname + self.msgout(4, "load_tail ->", m) + return m + + def ensure_fromlist(self, m, fromlist, recursive=0): + self.msg(4, "ensure_fromlist", m, fromlist, recursive) + for sub in fromlist: + if sub == "*": + if not recursive: + all = self.find_all_submodules(m) + if all: + self.ensure_fromlist(m, all, 1) + elif not hasattr(m, sub): + subname = "%s.%s" % (m.__name__, sub) + submod = self.import_module(sub, subname, m) + if not submod: + raise ImportError, "No module named " + subname + + def find_all_submodules(self, m): + if not m.__path__: + return + modules = {} + # 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"]. + # But we must also collect Python extension modules - although + # we cannot separate normal dlls from Python extensions. + suffixes = [] + for triple in imp.get_suffixes(): + suffixes.append(triple[0]) + for dir in m.__path__: + try: + names = os.listdir(dir) + except os.error: + self.msg(2, "can't list directory", dir) + continue + for name in names: + mod = None + for suff in suffixes: + n = len(suff) + if name[-n:] == suff: + mod = name[:-n] + break + if mod and mod != "__init__": + modules[mod] = mod + return modules.keys() + + def import_module(self, partname, fqname, parent): + self.msgin(3, "import_module", partname, fqname, parent) + try: + m = self.modules[fqname] + except KeyError: + pass + else: + self.msgout(3, "import_module ->", m) + return m + if self.badmodules.has_key(fqname): + self.msgout(3, "import_module -> None") + return None + if parent and parent.__path__ is None: + self.msgout(3, "import_module -> None") + return None + try: + fp, pathname, stuff = self.find_module(partname, + parent and parent.__path__, parent) + except ImportError: + self.msgout(3, "import_module ->", None) + return None + try: + m = self.load_module(fqname, fp, pathname, stuff) + finally: + if fp: fp.close() + if parent: + setattr(parent, partname, m) + self.msgout(3, "import_module ->", m) + return m + + def load_module(self, fqname, fp, pathname, (suffix, mode, type)): + self.msgin(2, "load_module", fqname, fp and "fp", pathname) + if type == imp.PKG_DIRECTORY: + m = self.load_package(fqname, pathname) + self.msgout(2, "load_module ->", m) + return m + if type == imp.PY_SOURCE: + co = compile(fp.read()+'\n', pathname, 'exec') + elif type == imp.PY_COMPILED: + if fp.read(4) != imp.get_magic(): + self.msgout(2, "raise ImportError: Bad magic number", pathname) + raise ImportError, "Bad magic number in %s" % pathname + fp.read(4) + co = marshal.load(fp) + else: + co = None + m = self.add_module(fqname) + m.__file__ = pathname + if co: + if self.replace_paths: + co = self.replace_paths_in_code(co) + m.__code__ = co + self.scan_code(co, m) + self.msgout(2, "load_module ->", m) + return m + + def _add_badmodule(self, name, caller): + if name not in self.badmodules: + self.badmodules[name] = {} + if caller: + self.badmodules[name][caller.__name__] = 1 + else: + self.badmodules[name]["-"] = 1 + + def _safe_import_hook(self, name, caller, fromlist, level=-1): + # wrapper for self.import_hook() that won't raise ImportError + if name in self.badmodules: + self._add_badmodule(name, caller) + return + try: + self.import_hook(name, caller, level=level) + except ImportError, msg: + self.msg(2, "ImportError:", str(msg)) + self._add_badmodule(name, caller) + else: + if fromlist: + for sub in fromlist: + if sub in self.badmodules: + self._add_badmodule(sub, caller) + continue + try: + self.import_hook(name, caller, [sub], level=level) + except ImportError, msg: + self.msg(2, "ImportError:", str(msg)) + fullname = name + "." + sub + self._add_badmodule(fullname, caller) + + def scan_opcodes(self, co, + unpack = struct.unpack): + # Scan the code, and yield 'interesting' opcode combinations + # Version for Python 2.4 and older + code = co.co_code + names = co.co_names + consts = co.co_consts + while code: + c = code[0] + if c in STORE_OPS: + oparg, = unpack('<H', code[1:3]) + yield "store", (names[oparg],) + code = code[3:] + continue + if c == LOAD_CONST and code[3] == IMPORT_NAME: + oparg_1, oparg_2 = unpack('<xHxH', code[:6]) + yield "import", (consts[oparg_1], names[oparg_2]) + code = code[6:] + continue + if c >= HAVE_ARGUMENT: + code = code[3:] + else: + code = code[1:] + + def scan_opcodes_25(self, co, + unpack = struct.unpack): + # Scan the code, and yield 'interesting' opcode combinations + # Python 2.5 version (has absolute and relative imports) + code = co.co_code + names = co.co_names + consts = co.co_consts + LOAD_LOAD_AND_IMPORT = LOAD_CONST + LOAD_CONST + IMPORT_NAME + while code: + c = code[0] + if c in STORE_OPS: + oparg, = unpack('<H', code[1:3]) + yield "store", (names[oparg],) + code = code[3:] + continue + if code[:9:3] == LOAD_LOAD_AND_IMPORT: + oparg_1, oparg_2, oparg_3 = unpack('<xHxHxH', code[:9]) + level = consts[oparg_1] + if level == -1: # normal import + yield "import", (consts[oparg_2], names[oparg_3]) + elif level == 0: # absolute import + yield "absolute_import", (consts[oparg_2], names[oparg_3]) + else: # relative import + yield "relative_import", (level, consts[oparg_2], names[oparg_3]) + code = code[9:] + continue + if c >= HAVE_ARGUMENT: + code = code[3:] + else: + code = code[1:] + + def scan_code(self, co, m): + code = co.co_code + if sys.version_info >= (2, 5): + scanner = self.scan_opcodes_25 + else: + scanner = self.scan_opcodes + for what, args in scanner(co): + if what == "store": + name, = args + m.globalnames[name] = 1 + elif what in ("import", "absolute_import"): + fromlist, name = args + have_star = 0 + if fromlist is not None: + if "*" in fromlist: + have_star = 1 + fromlist = [f for f in fromlist if f != "*"] + if what == "absolute_import": level = 0 + else: level = -1 + self._safe_import_hook(name, m, fromlist, level=level) + if have_star: + # We've encountered an "import *". If it is a Python module, + # the code has already been parsed and we can suck out the + # global names. + mm = None + if m.__path__: + # At this point we don't know whether 'name' is a + # submodule of 'm' or a global module. Let's just try + # the full name first. + mm = self.modules.get(m.__name__ + "." + name) + if mm is None: + mm = self.modules.get(name) + if mm is not None: + m.globalnames.update(mm.globalnames) + m.starimports.update(mm.starimports) + if mm.__code__ is None: + m.starimports[name] = 1 + else: + m.starimports[name] = 1 + elif what == "relative_import": + level, fromlist, name = args + if name: + self._safe_import_hook(name, m, fromlist, level=level) + else: + parent = self.determine_parent(m, level=level) + self._safe_import_hook(parent.__name__, None, fromlist, level=0) + else: + # We don't expect anything else from the generator. + raise RuntimeError(what) + + for c in co.co_consts: + if isinstance(c, type(co)): + self.scan_code(c, m) + + def load_package(self, fqname, pathname): + self.msgin(2, "load_package", fqname, pathname) + newname = replacePackageMap.get(fqname) + if newname: + fqname = newname + m = self.add_module(fqname) + m.__file__ = pathname + m.__path__ = [pathname] + + # As per comment at top of file, simulate runtime __path__ additions. + m.__path__ = m.__path__ + packagePathMap.get(fqname, []) + + fp, buf, stuff = self.find_module("__init__", m.__path__) + self.load_module(fqname, fp, buf, stuff) + self.msgout(2, "load_package ->", m) + return m + + def add_module(self, fqname): + if self.modules.has_key(fqname): + return self.modules[fqname] + self.modules[fqname] = m = Module(fqname) + return m + + def find_module(self, name, path, parent=None): + if parent is not None: + # assert path is not None + fullname = parent.__name__+'.'+name + else: + fullname = name + if fullname in self.excludes: + self.msgout(3, "find_module -> Excluded", fullname) + raise ImportError, name + + if path is None: + if name in sys.builtin_module_names: + return (None, None, ("", "", imp.C_BUILTIN)) + + path = self.path + return imp.find_module(name, path) + + def report(self): + """Print a report to stdout, listing the found modules with their + paths, as well as modules that are missing, or seem to be missing. + """ + print + print " %-25s %s" % ("Name", "File") + print " %-25s %s" % ("----", "----") + # Print modules found + keys = self.modules.keys() + keys.sort() + for key in keys: + m = self.modules[key] + if m.__path__: + print "P", + else: + print "m", + print "%-25s" % key, m.__file__ or "" + + # Print missing modules + missing, maybe = self.any_missing_maybe() + if missing: + print + print "Missing modules:" + for name in missing: + mods = self.badmodules[name].keys() + mods.sort() + print "?", name, "imported from", ', '.join(mods) + # Print modules that may be missing, but then again, maybe not... + if maybe: + print + print "Submodules thay appear to be missing, but could also be", + print "global names in the parent package:" + for name in maybe: + mods = self.badmodules[name].keys() + mods.sort() + print "?", name, "imported from", ', '.join(mods) + + def any_missing(self): + """Return a list of modules that appear to be missing. Use + any_missing_maybe() if you want to know which modules are + certain to be missing, and which *may* be missing. + """ + missing, maybe = self.any_missing_maybe() + return missing + maybe + + def any_missing_maybe(self): + """Return two lists, one with modules that are certainly missing + and one with modules that *may* be missing. The latter names could + either be submodules *or* just global names in the package. + + The reason it can't always be determined is that it's impossible to + tell which names are imported when "from module import *" is done + with an extension module, short of actually importing it. + """ + missing = [] + maybe = [] + for name in self.badmodules: + if name in self.excludes: + continue + i = name.rfind(".") + if i < 0: + missing.append(name) + continue + subname = name[i+1:] + pkgname = name[:i] + pkg = self.modules.get(pkgname) + if pkg is not None: + if pkgname in self.badmodules[name]: + # The package tried to import this module itself and + # failed. It's definitely missing. + missing.append(name) + elif subname in pkg.globalnames: + # It's a global in the package: definitely not missing. + pass + elif pkg.starimports: + # It could be missing, but the package did an "import *" + # from a non-Python module, so we simply can't be sure. + maybe.append(name) + else: + # It's not a global in the package, the package didn't + # do funny star imports, it's very likely to be missing. + # The symbol could be inserted into the package from the + # outside, but since that's not good style we simply list + # it missing. + missing.append(name) + else: + missing.append(name) + missing.sort() + maybe.sort() + return missing, maybe + + def replace_paths_in_code(self, co): + new_filename = original_filename = os.path.normpath(co.co_filename) + for f, r in self.replace_paths: + if original_filename.startswith(f): + new_filename = r + original_filename[len(f):] + break + + if self.debug and original_filename not in self.processed_paths: + if new_filename != original_filename: + self.msgout(2, "co_filename %r changed to %r" \ + % (original_filename,new_filename,)) + else: + self.msgout(2, "co_filename %r remains unchanged" \ + % (original_filename,)) + self.processed_paths.append(original_filename) + + consts = list(co.co_consts) + for i in range(len(consts)): + if isinstance(consts[i], type(co)): + consts[i] = self.replace_paths_in_code(consts[i]) + + return types.CodeType(co.co_argcount, co.co_nlocals, co.co_stacksize, + co.co_flags, co.co_code, tuple(consts), co.co_names, + co.co_varnames, new_filename, co.co_name, + co.co_firstlineno, co.co_lnotab, + co.co_freevars, co.co_cellvars) + + +def test(): + # Parse command line + import getopt + try: + opts, args = getopt.getopt(sys.argv[1:], "dmp:qx:") + except getopt.error, msg: + print msg + return + + # Process options + debug = 1 + domods = 0 + addpath = [] + exclude = [] + for o, a in opts: + if o == '-d': + debug = debug + 1 + if o == '-m': + domods = 1 + if o == '-p': + addpath = addpath + a.split(os.pathsep) + if o == '-q': + debug = 0 + if o == '-x': + exclude.append(a) + + # Provide default arguments + if not args: + script = "hello.py" + else: + script = args[0] + + # Set the path based on sys.path and the script directory + path = sys.path[:] + path[0] = os.path.dirname(script) + path = addpath + path + if debug > 1: + print "path:" + for item in path: + print " ", repr(item) + + # Create the module finder and turn its crank + mf = ModuleFinder(path, debug, exclude) + for arg in args[1:]: + if arg == '-m': + domods = 1 + continue + if domods: + if arg[-2:] == '.*': + mf.import_hook(arg[:-2], None, ["*"]) + else: + mf.import_hook(arg) + else: + mf.load_file(arg) + mf.run_script(script) + mf.report() + return mf # for -i debugging + + +if __name__ == '__main__': + try: + mf = test() + except KeyboardInterrupt: + print "\n[interrupt]" + + + +# py2exe specific portion - this should be removed before inclusion in the +# Python distribution + +import tempfile +import urllib + +try: + set +except NameError: + from sets import Set as set + +Base = ModuleFinder +del ModuleFinder + +# Much inspired by Toby Dickenson's code: +# http://www.tarind.com/depgraph.html +class ModuleFinder(Base): + def __init__(self, *args, **kw): + self._depgraph = {} + self._types = {} + self._last_caller = None + self._scripts = set() + Base.__init__(self, *args, **kw) + + def run_script(self, pathname): + # Scripts always end in the __main__ module, but we possibly + # have more than one script in py2exe, so we want to keep + # *all* the pathnames. + self._scripts.add(pathname) + Base.run_script(self, pathname) + + def import_hook(self, name, caller=None, fromlist=None, level=-1): + old_last_caller = self._last_caller + try: + self._last_caller = caller + return Base.import_hook(self,name,caller,fromlist,level) + finally: + self._last_caller = old_last_caller + + def import_module(self,partnam,fqname,parent): + r = Base.import_module(self,partnam,fqname,parent) + if r is not None and self._last_caller: + self._depgraph.setdefault(self._last_caller.__name__, set()).add(r.__name__) + return r + + def load_module(self, fqname, fp, pathname, (suffix, mode, typ)): + r = Base.load_module(self, fqname, fp, pathname, (suffix, mode, typ)) + if r is not None: + self._types[r.__name__] = typ + return r + + def create_xref(self): + # this code probably needs cleanup + depgraph = {} + importedby = {} + for name, value in self._depgraph.items(): + depgraph[name] = list(value) + for needs in value: + importedby.setdefault(needs, set()).add(name) + + names = self._types.keys() + names.sort() + + fd, htmlfile = tempfile.mkstemp(".html") + ofi = open(htmlfile, "w") + os.close(fd) + print >> ofi, "<html><title>py2exe cross reference for %s</title><body>" % sys.argv[0] + + print >> ofi, "<h1>py2exe cross reference for %s</h1>" % sys.argv[0] + + for name in names: + if self._types[name] in (imp.PY_SOURCE, imp.PKG_DIRECTORY): + print >> ofi, '<a name="%s"><b><tt>%s</tt></b></a>' % (name, name) + if name == "__main__": + for fname in self._scripts: + path = urllib.pathname2url(os.path.abspath(fname)) + print >> ofi, '<a target="code" href="%s" type="text/plain"><tt>%s</tt></a> ' \ + % (path, fname) + print >> ofi, '<br>imports:' + else: + fname = urllib.pathname2url(self.modules[name].__file__) + print >> ofi, '<a target="code" href="%s" type="text/plain"><tt>%s</tt></a><br>imports:' \ + % (fname, self.modules[name].__file__) + else: + fname = self.modules[name].__file__ + if fname: + print >> ofi, '<a name="%s"><b><tt>%s</tt></b></a> <tt>%s</tt><br>imports:' \ + % (name, name, fname) + else: + print >> ofi, '<a name="%s"><b><tt>%s</tt></b></a> <i>%s</i><br>imports:' \ + % (name, name, TYPES[self._types[name]]) + + if name in depgraph: + needs = depgraph[name] + for n in needs: + print >> ofi, '<a href="#%s"><tt>%s</tt></a> ' % (n, n) + print >> ofi, "<br>\n" + + print >> ofi, 'imported by:' + if name in importedby: + for i in importedby[name]: + print >> ofi, '<a href="#%s"><tt>%s</tt></a> ' % (i, i) + + print >> ofi, "<br>\n" + + print >> ofi, "<br>\n" + + print >> ofi, "</body></html>" + ofi.close() + os.startfile(htmlfile) + # how long does it take to start the browser? + import threading + threading.Timer(5, os.remove, args=[htmlfile]) + + +TYPES = {imp.C_BUILTIN: "(builtin module)", + imp.C_EXTENSION: "extension module", + imp.IMP_HOOK: "IMP_HOOK", + imp.PKG_DIRECTORY: "package directory", + imp.PY_CODERESOURCE: "PY_CODERESOURCE", + imp.PY_COMPILED: "compiled python module", + imp.PY_FROZEN: "frozen module", + imp.PY_RESOURCE: "PY_RESOURCE", + imp.PY_SOURCE: "python module", + imp.SEARCH_ERROR: "SEARCH_ERROR" + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2013-01-10 18:59:57
|
Revision: 696 http://py2exe.svn.sourceforge.net/py2exe/?rev=696&view=rev Author: theller Date: 2013-01-10 18:59:51 +0000 (Thu, 10 Jan 2013) Log Message: ----------- Add some notes, and create the directory structure. Also copy mf.py from py2exe trunk. Added Paths: ----------- trunk/py3exe/README.txt trunk/py3exe/py3exe/ Added: trunk/py3exe/README.txt =================================================================== --- trunk/py3exe/README.txt (rev 0) +++ trunk/py3exe/README.txt 2013-01-10 18:59:51 UTC (rev 696) @@ -0,0 +1,10 @@ +Start working on a rewrite of py2exe. + +Codename (in the repo) is py3exe. Not sure if this will also be the +official name. + +Planned features: + +Compatible with Python 2.7, and Python 3.x with the same codebase. +Should work with 32-bit and 64-bit builds. +MemoryLoadLibrary will no longer be used. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2013-01-10 18:55:00
|
Revision: 695 http://py2exe.svn.sourceforge.net/py2exe/?rev=695&view=rev Author: theller Date: 2013-01-10 18:54:51 +0000 (Thu, 10 Jan 2013) Log Message: ----------- Start working on a rewrite of py2exe. Planned features: Compatible with Python 2.7, and Python 3.x with the same codebase. Should work with 32-bit and 64-bit builds. MemoryLoadLibrary will no longer be used. Added Paths: ----------- trunk/py3exe/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2012-12-29 16:42:11
|
Revision: 694 http://py2exe.svn.sourceforge.net/py2exe/?rev=694&view=rev Author: theller Date: 2012-12-29 16:42:04 +0000 (Sat, 29 Dec 2012) Log Message: ----------- Test commit - can I still commit on sourceforge? Modified Paths: -------------- trunk/py2exe/build.cmd Modified: trunk/py2exe/build.cmd =================================================================== --- trunk/py2exe/build.cmd 2012-12-29 16:41:33 UTC (rev 693) +++ trunk/py2exe/build.cmd 2012-12-29 16:42:04 UTC (rev 694) @@ -20,4 +20,3 @@ C:\Python25\python.exe setup.py sdist -f rm -rf build - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2012-12-29 16:41:42
|
Revision: 693 http://py2exe.svn.sourceforge.net/py2exe/?rev=693&view=rev Author: theller Date: 2012-12-29 16:41:33 +0000 (Sat, 29 Dec 2012) Log Message: ----------- Test commit - can I still commit on sourceforge? Modified Paths: -------------- trunk/py2exe/build.cmd Modified: trunk/py2exe/build.cmd =================================================================== --- trunk/py2exe/build.cmd 2012-02-04 07:21:46 UTC (rev 692) +++ trunk/py2exe/build.cmd 2012-12-29 16:41:33 UTC (rev 693) @@ -20,3 +20,4 @@ C:\Python25\python.exe setup.py sdist -f rm -rf build + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2012-02-04 07:21:53
|
Revision: 692 http://py2exe.svn.sourceforge.net/py2exe/?rev=692&view=rev Author: mhammond Date: 2012-02-04 07:21:46 +0000 (Sat, 04 Feb 2012) Log Message: ----------- some syntax modernizations on the road to py3k Modified Paths: -------------- trunk/py2exe/py2exe/boot_com_servers.py trunk/py2exe/py2exe/boot_ctypes_com_server.py trunk/py2exe/py2exe/boot_service.py trunk/py2exe/py2exe/build_exe.py trunk/py2exe/py2exe/resources/StringTables.py trunk/py2exe/py2exe/resources/VersionInfo.py trunk/py2exe/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/wsh-typelib-stubs.py trunk/py2exe/sandbox/test/hello.py Modified: trunk/py2exe/py2exe/boot_com_servers.py =================================================================== --- trunk/py2exe/py2exe/boot_com_servers.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/boot_com_servers.py 2012-02-04 07:21:46 UTC (rev 692) @@ -50,7 +50,7 @@ def get_classes(module): return [ob - for ob in module.__dict__.values() + for ob in module.__dict__.itervalues() if hasattr(ob, "_reg_progid_") ] Modified: trunk/py2exe/py2exe/boot_ctypes_com_server.py =================================================================== --- trunk/py2exe/py2exe/boot_ctypes_com_server.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/boot_ctypes_com_server.py 2012-02-04 07:21:46 UTC (rev 692) @@ -52,7 +52,7 @@ def get_classes(module): return [ob - for ob in module.__dict__.values() + for ob in module.__dict__.itervalues() if hasattr(ob, "_reg_progid_") ] Modified: trunk/py2exe/py2exe/boot_service.py =================================================================== --- trunk/py2exe/py2exe/boot_service.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/boot_service.py 2012-02-04 07:21:46 UTC (rev 692) @@ -20,12 +20,12 @@ # This makes it possible to have a dotted name work the # way you'd expect. mod = __import__(name, globals(), locals(), ['DUMMY']) - for ob in mod.__dict__.values(): + for ob in mod.__dict__.itervalues(): if hasattr(ob, "_svc_name_"): service_klasses.append(ob) if not service_klasses: - raise RuntimeError, "No service classes found" + raise RuntimeError("No service classes found") # Event source records come from servicemanager evtsrc_dll = os.path.abspath(servicemanager.__file__) @@ -79,12 +79,12 @@ try: opts.append((arg, args[1])) except IndexError: - raise GetoptError, "option '%s' requires an argument" % args[0] + raise GetoptError("option '%s' requires an argument" % args[0]) args = args[1:] elif arg in options: opts.append((arg, '')) else: - raise GetoptError, "invalid option '%s'" % args[0] + raise GetoptError("invalid option '%s'" % args[0]) args = args[1:] else: arguments.append(args[0]) Modified: trunk/py2exe/py2exe/build_exe.py =================================================================== --- trunk/py2exe/py2exe/build_exe.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/build_exe.py 2012-02-04 07:21:46 UTC (rev 692) @@ -125,9 +125,9 @@ getattr(self, "icon_resources", []) for r_id, r_filename in resources: if type(r_id) != type(0): - raise DistutilsOptionError, "Resource ID must be an integer" + raise DistutilsOptionError("Resource ID must be an integer") if not os.path.isfile(r_filename): - raise DistutilsOptionError, "Resource filename '%s' does not exist" % r_filename + raise DistutilsOptionError("Resource filename '%s' does not exist" % r_filename) def FixupTargets(targets, default_attribute): if not targets: @@ -140,8 +140,8 @@ else: d = getattr(target_def, "__dict__", target_def) if not d.has_key(default_attribute): - raise DistutilsOptionError, \ - "This target class requires an attribute '%s'" % default_attribute + raise DistutilsOptionError( + "This target class requires an attribute '%s'" % default_attribute) target = Target(**d) target.validate() ret.append(target) @@ -214,18 +214,14 @@ self.ignores = fancy_split(self.ignores) self.bundle_files = int(self.bundle_files) if self.bundle_files < 1 or self.bundle_files > 3: - raise DistutilsOptionError, \ - "bundle-files must be 1, 2, or 3, not %s" % self.bundle_files + raise DistutilsOptionError("bundle-files must be 1, 2, or 3, not %s" % self.bundle_files) if is_win64 and self.bundle_files < 3: - raise DistutilsOptionError, \ - "bundle-files %d not yet supported on win64" % self.bundle_files + raise DistutilsOptionError("bundle-files %d not yet supported on win64" % self.bundle_files) if self.skip_archive: if self.compressed: - raise DistutilsOptionError, \ - "can't compress when skipping archive" + raise DistutilsOptionError("can't compress when skipping archive") if self.distribution.zipfile is None: - raise DistutilsOptionError, \ - "zipfile cannot be None when skipping archive" + raise DistutilsOptionError("zipfile cannot be None when skipping archive") # includes is stronger than excludes for m in self.includes: if m in self.excludes: @@ -291,8 +287,8 @@ try: result = orig_compile(source, filename, *args) except Exception, details: - raise DistutilsError, "compiling '%s' failed\n %s: %s" % \ - (filename, details.__class__.__name__, details) + raise DistutilsError("compiling '%s' failed\n %s: %s" % \ + (filename, details.__class__.__name__, details)) return result __builtin__.compile = my_compile @@ -674,14 +670,12 @@ paths.add(os.path.dirname(target.get_dest_base())) if len(paths) > 1: - raise DistutilsOptionError, \ - "all targets must use the same directory: %s" % \ - [p for p in paths] + raise DistutilsOptionError("all targets must use the same directory: %s" % \ + [p for p in paths]) if paths: exe_dir = paths.pop() # the only element if os.path.isabs(exe_dir): - raise DistutilsOptionError, \ - "exe directory must be relative: %s" % exe_dir + raise DistutilsOptionError("exe directory must be relative: %s" % exe_dir) self.exe_dir = os.path.join(self.dist_dir, exe_dir) self.mkpath(self.exe_dir) else: @@ -711,11 +705,11 @@ # import the script with every side effect :) __import__(module_name) mod = sys.modules[module_name] - for name, klass in mod.__dict__.items(): + for name, klass in mod.__dict__.iteritems(): if hasattr(klass, "_svc_name_"): break else: - raise RuntimeError, "No services in module" + raise RuntimeError("No services in module") deps = () if hasattr(klass, "_svc_deps_"): deps = klass._svc_deps_ @@ -728,7 +722,7 @@ cmdline_style = getattr(target, "cmdline_style", "py2exe") if cmdline_style not in ["py2exe", "pywin32", "custom"]: - raise RuntimeError, "cmdline_handler invalid" + raise RuntimeError("cmdline_handler invalid") vars = {"service_module_names" : target.modules, "cmdline_style": cmdline_style, @@ -838,7 +832,7 @@ code_objects.append( compile("import zipextimporter; zipextimporter.install()", "<install zipextimporter>", "exec")) - for var_name, var_val in vars.items(): + for var_name, var_val in vars.iteritems(): code_objects.append( compile("%s=%r\n" % (var_name, var_val), var_name, "exec") ) @@ -1093,14 +1087,14 @@ } def parse_mf_results(self, mf): - for name, imports in self.get_hidden_imports().items(): - if name in mf.modules.keys(): + for name, imports in self.get_hidden_imports().iteritems(): + if name in mf.modules: for mod in imports: mf.import_hook(mod) tcl_src_dir = tcl_dst_dir = None if "Tkinter" in mf.modules.keys(): - import Tkinter + import tkinter import _tkinter tk = _tkinter.create() tcl_dir = tk.call("info", "library") @@ -1119,7 +1113,7 @@ extensions = [] builtins = [] - for item in mf.modules.values(): + for item in mf.modules.itervalues(): # There may be __main__ modules (from mf.run_script), but # we don't need them in the zipfile we build. if item.__name__ == "__main__": @@ -1161,19 +1155,19 @@ if sys.platform == "win32": # pythoncom and pywintypes are imported via LoadLibrary calls, # help py2exe to include the dlls: - if "pythoncom" in modules.keys(): + if "pythoncom" in modules: import pythoncom dlls.add(pythoncom.__file__) - if "pywintypes" in modules.keys(): + if "pywintypes" in modules: import pywintypes dlls.add(pywintypes.__file__) self.copy_w9xpopen(modules, dlls) else: - raise DistutilsError, "Platform %s not yet implemented" % sys.platform + raise DistutilsError("Platform %s not yet implemented" % sys.platform) def copy_w9xpopen(self, modules, dlls): # Using popen requires (on Win9X) the w9xpopen.exe helper executable. - if "os" in modules.keys() or "popen2" in modules.keys(): + if "os" in modules or "popen2" in modules: if is_debug_build: fname = os.path.join(os.path.dirname(sys.executable), "w9xpopen_d.exe") else: @@ -1274,7 +1268,7 @@ "w9xpopen%s.exe" % (is_debug_build and "_d" or ""), "msvcr71%s.dll" % (is_debug_build and "d" or "")] else: - raise DistutilsError, "Platform %s not yet implemented" % sys.platform + raise DistutilsError("Platform %s not yet implemented" % sys.platform) def find_needed_modules(self, mf, files, modules): # feed Modulefinder with everything, and return it. @@ -1414,10 +1408,10 @@ del self._dict[fname.upper()] def __contains__(self, fname): - return fname.upper() in self._dict.keys() + return fname.upper() in self._dict def __getitem__(self, index): - key = self._dict.keys()[index] + key = list(self._dict.keys())[index] return self._dict[key] def __len__(self): @@ -1443,7 +1437,7 @@ dependents.add(image) abs_image = os.path.abspath(image) loadpath = os.path.dirname(abs_image) + ';' + path - for result in py2exe_util.depends(image, loadpath).items(): + for result in py2exe_util.depends(image, loadpath).iteritems(): dll, uses_import_module = result if os.path.basename(dll).lower() not in excluded_dlls: if isSystemDLL(dll): @@ -1503,12 +1497,12 @@ import struct file = open(pathname, "rb") if file.read(2) != "MZ": - raise Exception, "Seems not to be an exe-file" + raise Exception("Seems not to be an exe-file") file.seek(0x3C) pe_ofs = struct.unpack("i", file.read(4))[0] file.seek(pe_ofs) if file.read(4) != "PE\000\000": - raise Exception, ("Seems not to be an exe-file", pathname) + raise Exception("Seems not to be an exe-file", pathname) file.read(20 + 28) # COFF File Header, offset of ImageBase in Optional Header imagebase = struct.unpack("I", file.read(4))[0] return not (imagebase < 0x70000000) @@ -1538,14 +1532,14 @@ for f in py_files: script.write("Module(%s, %s, %s),\n" % \ - (`f.__name__`, `f.__file__`, `f.__path__`)) + (repr(f.__name__), repr(f.__file__), repr(f.__path__))) script.write("]\n") script.write(""" byte_compile(files, optimize=%s, force=%s, target_dir=%s, verbose=%s, dry_run=0, direct=1) -""" % (`optimize`, `force`, `target_dir`, `verbose`)) +""" % (repr(optimize), repr(force), repr(target_dir), repr(verbose))) script.close() @@ -1659,7 +1653,7 @@ makepy.GenerateFromTypeLibSpec(tlb_info, bForDemand = False) # Now get the module, and build all sub-modules. mod = gencache.GetModuleForTypelib(*tlb_info) - for clsid, name in mod.CLSIDToPackageMap.items(): + for clsid, name in mod.CLSIDToPackageMap.iteritems(): try: gencache.GetModuleForCLSID(clsid) num += 1 @@ -1708,7 +1702,7 @@ cmd[0](cmd[1]) # remove dir from cache if it's already there abspath = os.path.abspath(cmd[1]) - if _path_created.has_key(abspath): + if abspath in _path_created: del _path_created[abspath] except (IOError, OSError), exc: if verbose: Modified: trunk/py2exe/py2exe/resources/StringTables.py =================================================================== --- trunk/py2exe/py2exe/resources/StringTables.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/resources/StringTables.py 2012-02-04 07:21:46 UTC (rev 692) @@ -47,7 +47,7 @@ try: import pywintypes except ImportError: - raise ImportError, "Could not import StringTables, no unicode available" + raise ImportError("Could not import StringTables, no unicode available") if _use_unicode: @@ -90,7 +90,7 @@ def binary(self): import struct sections = [] - for key, sect in self.sections().items(): + for key, sect in self.sections().iteritems(): data = "" for i in range(16): ustr = w32_uc(sect.get(i, "")) Modified: trunk/py2exe/py2exe/resources/VersionInfo.py =================================================================== --- trunk/py2exe/py2exe/resources/VersionInfo.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/resources/VersionInfo.py 2012-02-04 07:21:46 UTC (rev 692) @@ -92,7 +92,7 @@ self.dwFileVersionMS = int(fields[0]) * 65536 + int(fields[1]) self.dwFileVersionLS = int(fields[2]) * 65536 + int(fields[3]) except ValueError: - raise VersionError, "could not parse version number '%s'" % version + raise VersionError("could not parse version number '%s'" % version) def __str__(self): return struct.pack(self.fmt, @@ -145,7 +145,8 @@ wType = 1 items = () - def __init__(self, (name, value)): + def __init__(self, name_value): + (name, value) = name_value self.name = name if value: self.value = value + '\000' # strings must be zero terminated Modified: trunk/py2exe/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/wsh-typelib-stubs.py =================================================================== --- trunk/py2exe/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/wsh-typelib-stubs.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/wsh-typelib-stubs.py 2012-02-04 07:21:46 UTC (rev 692) @@ -157,7 +157,7 @@ return win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),()),'{C7C3F5A0-88A3-11D0-ABCB-00A0C90FFFC0}') def __getitem__(self, index): "Allow this class to be accessed as a collection" - if not self.__dict__.has_key('_enum_'): + if '_enum' not self.__dict__: self.__dict__['_enum_'] = self._NewEnum() return self._enum_.__getitem__(index) #This class has Count() property - allow len(ob) to provide this @@ -270,7 +270,7 @@ return win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),()),'{C7C3F5A4-88A3-11D0-ABCB-00A0C90FFFC0}') def __getitem__(self, index): "Allow this class to be accessed as a collection" - if not self.__dict__.has_key('_enum_'): + if '_enum' not in self.__dict__: self.__dict__['_enum_'] = self._NewEnum() return self._enum_.__getitem__(index) #This class has Count() property - allow len(ob) to provide this @@ -693,7 +693,7 @@ return win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,2,(13, 10),()),'{C7C3F5A2-88A3-11D0-ABCB-00A0C90FFFC0}') def __getitem__(self, index): "Allow this class to be accessed as a collection" - if not self.__dict__.has_key('_enum_'): + if '_enum' not self.__dict__: self.__dict__['_enum_'] = self._NewEnum() return self._enum_.__getitem__(index) #This class has Count() property - allow len(ob) to provide this @@ -792,7 +792,7 @@ return win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,1,(13, 10),()),None) def __getitem__(self, index): "Allow this class to be accessed as a collection" - if not self.__dict__.has_key('_enum_'): + if '_enum_' not in self.__dict__: self.__dict__['_enum_'] = self._NewEnum() return self._enum_.__getitem__(index) #This class has Count() method - allow len(ob) to provide this @@ -856,7 +856,7 @@ return win32com.client.util.WrapEnum(self._oleobj_.InvokeTypes(-4,LCID,1,(13, 10),()),None) def __getitem__(self, index): "Allow this class to be accessed as a collection" - if not self.__dict__.has_key('_enum_'): + if '_enum_' not in self.__dict__: self.__dict__['_enum_'] = self._NewEnum() return self._enum_.__getitem__(index) #This class has Count() method - allow len(ob) to provide this Modified: trunk/py2exe/sandbox/test/hello.py =================================================================== --- trunk/py2exe/sandbox/test/hello.py 2012-02-04 07:08:51 UTC (rev 691) +++ trunk/py2exe/sandbox/test/hello.py 2012-02-04 07:21:46 UTC (rev 692) @@ -1,4 +1,5 @@ from __future__ import division +# -*- coding: latin-1 -*- import sys This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2012-02-04 07:08:57
|
Revision: 691 http://py2exe.svn.sourceforge.net/py2exe/?rev=691&view=rev Author: mhammond Date: 2012-02-04 07:08:51 +0000 (Sat, 04 Feb 2012) Log Message: ----------- allow dll_excludes to contain patterns Modified Paths: -------------- trunk/py2exe/py2exe/build_exe.py Modified: trunk/py2exe/py2exe/build_exe.py =================================================================== --- trunk/py2exe/py2exe/build_exe.py 2012-01-22 04:06:46 UTC (rev 690) +++ trunk/py2exe/py2exe/build_exe.py 2012-02-04 07:08:51 UTC (rev 691) @@ -20,6 +20,7 @@ import tempfile import struct import re +import fnmatch is_win64 = struct.calcsize("P") == 8 @@ -305,12 +306,16 @@ mf.create_xref() print "*** finding dlls needed ***" - dlls = self.find_dlls(extensions) + alldlls = self.find_dlls(extensions) + dlls = set() + for dll in alldlls: + for filter in self.dll_excludes: + if fnmatch.fnmatch(os.path.basename(dll), filter): + break + else: + dlls.add(dll) + # should we filter self.other_depends in the same way? self.plat_finalize(mf.modules, py_files, extensions, dlls) - dlls = [item for item in dlls - if os.path.basename(item).lower() not in self.dll_excludes] - # should we filter self.other_depends in the same way? - print "*** create binaries ***" self.create_binaries(py_files, extensions, dlls) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2012-01-22 04:06:53
|
Revision: 690 http://py2exe.svn.sourceforge.net/py2exe/?rev=690&view=rev Author: mhammond Date: 2012-01-22 04:06:46 +0000 (Sun, 22 Jan 2012) Log Message: ----------- ensure all py2exe targets have a manifest referencing the crt Modified Paths: -------------- trunk/py2exe/setup.py Modified: trunk/py2exe/setup.py =================================================================== --- trunk/py2exe/setup.py 2011-10-03 23:12:39 UTC (rev 689) +++ trunk/py2exe/setup.py 2012-01-22 04:06:46 UTC (rev 690) @@ -43,6 +43,36 @@ if sys.version_info < (2, 3): 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 +# removed in an effort to be helpful. +# For some background on the general problem, see +# http://bugs.python.org/issue7833 +if sys.version_info > (2,6): + import shutil + from distutils.spawn import spawn + from distutils.msvc9compiler import MSVCCompiler + MSVCCompiler._orig_spawn = MSVCCompiler.spawn + def monkeypatched_spawn(self, cmd): + is_link = cmd[0].endswith("link.exe") or cmd[0].endswith('"link.exe"') + if cmd[0].endswith("mt.exe"): + # We want mt.exe run with the original manifest + for i in range(len(cmd)): + if cmd[i] == "-manifest": + cmd[i+1] = cmd[i+1] + ".orig" + break + self._orig_spawn(cmd) + if is_link: + # We want a copy of the original manifest so we can use it later. + for i in range(len(cmd)): + if cmd[i].startswith("/MANIFESTFILE:"): + mfname = cmd[i][14:] + shutil.copyfile(mfname, mfname + ".orig") + break + + MSVCCompiler.spawn = monkeypatched_spawn + + class Interpreter(Extension): def __init__(self, *args, **kw): # Add a custom 'target_desc' option, which matches CCompiler This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2011-10-03 23:12:45
|
Revision: 689 http://py2exe.svn.sourceforge.net/py2exe/?rev=689&view=rev Author: mhammond Date: 2011-10-03 23:12:39 +0000 (Mon, 03 Oct 2011) Log Message: ----------- ensure sys.frozendllhandle is valid in 64bit builds Modified Paths: -------------- trunk/py2exe/source/run_ctypes_dll.c trunk/py2exe/source/run_dll.c trunk/py2exe/source/run_isapi.c Modified: trunk/py2exe/source/run_ctypes_dll.c =================================================================== --- trunk/py2exe/source/run_ctypes_dll.c 2010-04-26 07:22:49 UTC (rev 688) +++ trunk/py2exe/source/run_ctypes_dll.c 2011-10-03 23:12:39 UTC (rev 689) @@ -138,7 +138,7 @@ // a little DLL magic. Set sys.frozen='dll' init_with_instance(gInstance, "dll"); init_memimporter(); - frozen = PyInt_FromLong((LONG)gInstance); + frozen = PyLong_FromVoidPtr(gInstance); if (frozen) { PySys_SetObject("frozendllhandle", frozen); Py_DECREF(frozen); Modified: trunk/py2exe/source/run_dll.c =================================================================== --- trunk/py2exe/source/run_dll.c 2010-04-26 07:22:49 UTC (rev 688) +++ trunk/py2exe/source/run_dll.c 2011-10-03 23:12:39 UTC (rev 689) @@ -201,7 +201,7 @@ // a little DLL magic. Set sys.frozen='dll' init_with_instance(gInstance, "dll"); init_memimporter(); - frozen = PyInt_FromLong((LONG)gInstance); + frozen = PyLong_FromVoidPtr(gInstance); if (frozen) { PySys_SetObject("frozendllhandle", frozen); Py_DECREF(frozen); Modified: trunk/py2exe/source/run_isapi.c =================================================================== --- trunk/py2exe/source/run_isapi.c 2010-04-26 07:22:49 UTC (rev 688) +++ trunk/py2exe/source/run_isapi.c 2011-10-03 23:12:39 UTC (rev 689) @@ -185,7 +185,7 @@ goto done; } init_memimporter(); - frozen = PyInt_FromLong((LONG)gInstance); + frozen = PyLong_FromVoidPtr(gInstance); if (frozen) { PySys_SetObject("frozendllhandle", frozen); Py_DECREF(frozen); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2010-04-26 07:22:55
|
Revision: 688 http://py2exe.svn.sourceforge.net/py2exe/?rev=688&view=rev Author: theller Date: 2010-04-26 07:22:49 +0000 (Mon, 26 Apr 2010) Log Message: ----------- Fix compiler warnings. Modified Paths: -------------- trunk/py2exe/setup.py trunk/py2exe/source/MemoryModule.c trunk/py2exe/source/py2exe_util.c Modified: trunk/py2exe/setup.py =================================================================== --- trunk/py2exe/setup.py 2009-08-14 19:43:50 UTC (rev 687) +++ trunk/py2exe/setup.py 2010-04-26 07:22:49 UTC (rev 688) @@ -332,10 +332,12 @@ if _is_debug_build(): macros = [("PYTHONDLL", '\\"PYTHON%d%d_d.DLL\\"' % sys.version_info[:2]), - ("PYTHONCOM", '\\"pythoncom%d%d_d.dll\\"' % sys.version_info[:2])] + ("PYTHONCOM", '\\"pythoncom%d%d_d.dll\\"' % sys.version_info[:2]), + ("_CRT_SECURE_NO_WARNINGS", '1')] else: macros = [("PYTHONDLL", '\\"PYTHON%d%d.DLL\\"' % sys.version_info[:2]), - ("PYTHONCOM", '\\"pythoncom%d%d.dll\\"' % sys.version_info[:2])] + ("PYTHONCOM", '\\"pythoncom%d%d.dll\\"' % sys.version_info[:2]), + ("_CRT_SECURE_NO_WARNINGS", '1')] if 'zlib' in sys.builtin_module_names: macros.append(("PYZLIB_BUILTIN", None)) Modified: trunk/py2exe/source/MemoryModule.c =================================================================== --- trunk/py2exe/source/MemoryModule.c 2009-08-14 19:43:50 UTC (rev 687) +++ trunk/py2exe/source/MemoryModule.c 2010-04-26 07:22:49 UTC (rev 688) @@ -102,7 +102,7 @@ MEMORYMODULE *p = loaded; while (p) { // If already loaded, only increment the reference count - if (0 == stricmp(lpModuleName, p->name)) { + if (0 == _stricmp(lpModuleName, p->name)) { return (HMODULE)p; } p = p->next; @@ -121,7 +121,7 @@ while (p) { // If already loaded, only increment the reference count - if (0 == stricmp(lpFileName, p->name)) { + if (0 == _stricmp(lpFileName, p->name)) { p->refcount++; return (HMODULE)p; } @@ -435,7 +435,7 @@ while (p) { // If already loaded, only increment the reference count - if (0 == stricmp(name, p->name)) { + if (0 == _stricmp(name, p->name)) { p->refcount++; return (HMODULE)p; } @@ -493,7 +493,7 @@ result->initialized = 0; result->next = result->prev = NULL; result->refcount = 1; - result->name = strdup(name); + result->name = _strdup(name); result->name_table = NULL; // XXX: is it correct to commit the complete memory region at once? @@ -570,12 +570,12 @@ int _compare(const struct NAME_TABLE *p1, const struct NAME_TABLE *p2) { - return stricmp(p1->name, p2->name); + return _stricmp(p1->name, p2->name); } int _find(const char **name, const struct NAME_TABLE *p) { - return stricmp(*name, p->name); + return _stricmp(*name, p->name); } struct NAME_TABLE *GetNameTable(PMEMORYMODULE module) Modified: trunk/py2exe/source/py2exe_util.c =================================================================== --- trunk/py2exe/source/py2exe_util.c 2009-08-14 19:43:50 UTC (rev 687) +++ trunk/py2exe/source/py2exe_util.c 2010-04-26 07:22:49 UTC (rev 688) @@ -430,8 +430,8 @@ BOOL __stdcall StatusRoutine(IMAGEHLP_STATUS_REASON reason, PSTR ImageName, PSTR DllName, - ULONG Va, - ULONG Parameter) + ULONG_PTR Va, + ULONG_PTR Parameter) { DWORD result; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2009-08-14 19:44:00
|
Revision: 687 http://py2exe.svn.sourceforge.net/py2exe/?rev=687&view=rev Author: theller Date: 2009-08-14 19:43:50 +0000 (Fri, 14 Aug 2009) Log Message: ----------- Fix a DeprecationWarning in Python2.6. Modified Paths: -------------- trunk/py2exe/ChangeLog trunk/py2exe/py2exe/build_exe.py Modified: trunk/py2exe/ChangeLog =================================================================== --- trunk/py2exe/ChangeLog 2009-04-10 01:55:05 UTC (rev 686) +++ trunk/py2exe/ChangeLog 2009-08-14 19:43:50 UTC (rev 687) @@ -1,3 +1,8 @@ +2009-08-14 Thomas Heller <th...@py...> + + * Fix 'DeprecationWarning: the sets module is deprecated' in Python 2.6, + when building an executable. + 2008-04-10 Mark Hammond * If a Python 2.5 built app was installed over a Python 2.4 built app, Modified: trunk/py2exe/py2exe/build_exe.py =================================================================== --- trunk/py2exe/py2exe/build_exe.py 2009-04-10 01:55:05 UTC (rev 686) +++ trunk/py2exe/py2exe/build_exe.py 2009-08-14 19:43:50 UTC (rev 687) @@ -13,7 +13,10 @@ import sys, os, imp, types, stat import marshal import zipfile -import sets +try: + set +except NameError: + from sets import Set as set import tempfile import struct import re @@ -660,7 +663,7 @@ # make sure all targets use the same directory, this is # also the directory where the pythonXX.dll must reside - paths = sets.Set() + paths = set() for target in dist.com_server + dist.service \ + dist.windows + dist.console + dist.isapi: paths.add(os.path.dirname(target.get_dest_base())) @@ -1032,7 +1035,7 @@ # so the loadpath must be extended by our python path. loadpath = loadpath + ';' + ';'.join(pypath) - templates = sets.Set() + templates = set() if self.distribution.console: templates.add(self.get_console_template()) if self.distribution.windows: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2009-04-10 02:01:16
|
Revision: 685 http://py2exe.svn.sourceforge.net/py2exe/?rev=685&view=rev Author: mhammond Date: 2009-04-10 01:48:01 +0000 (Fri, 10 Apr 2009) Log Message: ----------- If we can't find any python's use the one we are running now Modified Paths: -------------- trunk/py2exe/test/test.py Modified: trunk/py2exe/test/test.py =================================================================== --- trunk/py2exe/test/test.py 2008-12-14 23:44:53 UTC (rev 684) +++ trunk/py2exe/test/test.py 2009-04-10 01:48:01 UTC (rev 685) @@ -55,12 +55,16 @@ def PythonInterpreters(pattern): + num_found = 0 for folder in glob.glob(pattern): path = os.path.join(folder, 'python.exe') if os.path.exists(path): errorlevel, output = run(path, '-c', 'import sys; print sys.version') if errorlevel == 0: + num_found += 1 yield output.strip(), path + if not num_found: + yield sys.version, sys.executable def shortVersion(version): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2009-04-10 01:55:06
|
Revision: 686 http://py2exe.svn.sourceforge.net/py2exe/?rev=686&view=rev Author: mhammond Date: 2009-04-10 01:55:05 +0000 (Fri, 10 Apr 2009) Log Message: ----------- Fix crash when a Python 2.5 built app was installed over a Python 2.4 built app. The app would crash as Python 2.5 loaded Python 2.4's zlib.pyd; zlib is builtin in Python 2.5 and later, so no 2.5 version of zlib.pyd exists. Modified Paths: -------------- trunk/py2exe/ChangeLog trunk/py2exe/setup.py trunk/py2exe/source/start.c Modified: trunk/py2exe/ChangeLog =================================================================== --- trunk/py2exe/ChangeLog 2009-04-10 01:48:01 UTC (rev 685) +++ trunk/py2exe/ChangeLog 2009-04-10 01:55:05 UTC (rev 686) @@ -1,3 +1,9 @@ +2008-04-10 Mark Hammond + + * If a Python 2.5 built app was installed over a Python 2.4 built app, + the app would crash as Python 2.5 loaded Python 2.4's zlib.pyd; zlib is + builtin in Python 2.5 and later, so no 2.5 version of zlib.pyd exists. + 2008-12-15 Mark Hammond * Fix via the mailing list to fix strange icons being displayed on Vista. Modified: trunk/py2exe/setup.py =================================================================== --- trunk/py2exe/setup.py 2009-04-10 01:48:01 UTC (rev 685) +++ trunk/py2exe/setup.py 2009-04-10 01:55:05 UTC (rev 686) @@ -336,6 +336,8 @@ else: macros = [("PYTHONDLL", '\\"PYTHON%d%d.DLL\\"' % sys.version_info[:2]), ("PYTHONCOM", '\\"pythoncom%d%d.dll\\"' % sys.version_info[:2])] +if 'zlib' in sys.builtin_module_names: + macros.append(("PYZLIB_BUILTIN", None)) ##macros.append(("AS_PY2EXE_BUILTIN", "1")) # for runtime linking python.dll in _memimporter.c depends = ["source/import-tab.c", "source/import-tab.h"] Modified: trunk/py2exe/source/start.c =================================================================== --- trunk/py2exe/source/start.c 2009-04-10 01:48:01 UTC (rev 685) +++ trunk/py2exe/source/start.c 2009-04-10 01:55:05 UTC (rev 686) @@ -439,7 +439,13 @@ } } + // If zlib is builtin to pythonxx.dll, we don't need to take any + // special action (and worse, if it so happens an old version of + // the app built with python 2.4 is installed, we might attempt to + // load that python24 pyd, causing death...) +#ifndef PYZLIB_BUILTIN _TryLoadZlib(hmod); +#endif return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mha...@us...> - 2008-12-14 23:44:55
|
Revision: 684 http://py2exe.svn.sourceforge.net/py2exe/?rev=684&view=rev Author: mhammond Date: 2008-12-14 23:44:53 +0000 (Sun, 14 Dec 2008) Log Message: ----------- Fix via the mailing list to fix strange icons being displayed on Vista. Modified Paths: -------------- trunk/py2exe/ChangeLog trunk/py2exe/source/py2exe_util.c Modified: trunk/py2exe/ChangeLog =================================================================== --- trunk/py2exe/ChangeLog 2008-11-16 07:23:46 UTC (rev 683) +++ trunk/py2exe/ChangeLog 2008-12-14 23:44:53 UTC (rev 684) @@ -1,3 +1,7 @@ +2008-12-15 Mark Hammond + + * Fix via the mailing list to fix strange icons being displayed on Vista. + 2008-11-06 Thomas Heller <th...@py...> * Fixed a modulefinder crash on certain relative imports. Modified: trunk/py2exe/source/py2exe_util.c =================================================================== --- trunk/py2exe/source/py2exe_util.c 2008-11-16 07:23:46 UTC (rev 683) +++ trunk/py2exe/source/py2exe_util.c 2008-12-14 23:44:53 UTC (rev 684) @@ -183,7 +183,7 @@ static PyObject* do_add_icon(Py_UNICODE *exename, Py_UNICODE *iconame, int icoid, BOOL bDelete) { - static rt_icon_id = 0; + static rt_icon_id = 1; /* from the .ico file */ ICONDIRHEADER *pidh; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-16 07:23:53
|
Revision: 683 http://py2exe.svn.sourceforge.net/py2exe/?rev=683&view=rev Author: jretz Date: 2008-11-16 07:23:46 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Removed SourceForge from the web site upload batch file as it is no longer used. Modified Paths: -------------- trunk/py2exe/docs/updateweb.cmd Modified: trunk/py2exe/docs/updateweb.cmd =================================================================== --- trunk/py2exe/docs/updateweb.cmd 2008-11-16 07:23:11 UTC (rev 682) +++ trunk/py2exe/docs/updateweb.cmd 2008-11-16 07:23:46 UTC (rev 683) @@ -1,2 +1 @@ scp index.html default.css LICENSE.txt py2exe.jpg jr...@py...:~/py2exe.org/old -scp index.html default.css LICENSE.txt py2exe.jpg jr...@sh...:/home/groups/p/py/py2exe/htdocs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-16 07:23:16
|
Revision: 682 http://py2exe.svn.sourceforge.net/py2exe/?rev=682&view=rev Author: jretz Date: 2008-11-16 07:23:11 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Updated version number to 0.6.10dev to disambiguate from the released 0.6.9. Modified Paths: -------------- trunk/py2exe/py2exe/__init__.py Modified: trunk/py2exe/py2exe/__init__.py =================================================================== --- trunk/py2exe/py2exe/__init__.py 2008-11-16 07:08:06 UTC (rev 681) +++ trunk/py2exe/py2exe/__init__.py 2008-11-16 07:23:11 UTC (rev 682) @@ -62,7 +62,7 @@ # special one contained in this module. # -__version__ = "0.6.9" +__version__ = "0.6.10dev" import distutils.dist, distutils.core, distutils.command, build_exe, sys This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-16 07:08:08
|
Revision: 681 http://py2exe.svn.sourceforge.net/py2exe/?rev=681&view=rev Author: jretz Date: 2008-11-16 07:08:06 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Release 0.6.9 Added Paths: ----------- tags/release_0_6_9/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-16 06:44:13
|
Revision: 680 http://py2exe.svn.sourceforge.net/py2exe/?rev=680&view=rev Author: jretz Date: 2008-11-16 06:44:11 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Fix references to 64-bit installer filenames. Modified Paths: -------------- trunk/py2exe/ANNOUNCE trunk/py2exe/docs/py2exe.txt Modified: trunk/py2exe/ANNOUNCE =================================================================== --- trunk/py2exe/ANNOUNCE 2008-11-16 06:07:44 UTC (rev 679) +++ trunk/py2exe/ANNOUNCE 2008-11-16 06:44:11 UTC (rev 680) @@ -12,16 +12,16 @@ * Fixed a modulefinder crash on certain relative imports. - * Changed the py2exe\samples\singlefile\gui\test_wx.py sample to - use the wx package instead of the old wxPython package. + * Changed the py2exe\samples\singlefile\gui\test_wx.py sample to + use the wx package instead of the old wxPython package. - * Copy the manifest, if any, from the 'template' into the targets - to ensure embedded assembly references, as required for python 2.6 based - apps, are copied. + * Copy the manifest, if any, from the 'template' into the targets + to ensure embedded assembly references, as required for python 2.6 based + apps, are copied. - * Allow each target to specify Vista User Access Control flags. For - example, specifying 'uac_execution_info="requireAdministrator"' would - force elevation for the final executable. + * Allow each target to specify Vista User Access Control flags. For + example, specifying 'uac_execution_info="requireAdministrator"' would + force elevation for the final executable. Changes in 0.6.8: Modified: trunk/py2exe/docs/py2exe.txt =================================================================== --- trunk/py2exe/docs/py2exe.txt 2008-11-16 06:07:44 UTC (rev 679) +++ trunk/py2exe/docs/py2exe.txt 2008-11-16 06:44:11 UTC (rev 680) @@ -17,11 +17,11 @@ .. _py2exe-0.6.9.win32-py2.6.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.6.exe?download -.. _py2exe-0.6.9.win64-py2.6.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.6.amd64.msi?download +.. _py2exe-0.6.9.win64-py2.6.amd64.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.6.amd64.exe?download .. _py2exe-0.6.9.win32-py2.7.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.7.exe?download -.. _py2exe-0.6.9.win64-py2.7.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.7.amd64.msi?download +.. _py2exe-0.6.9.win64-py2.7.amd64.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.7.amd64.exe?download .. _WIKI: http://www.py2exe.org/ @@ -421,9 +421,9 @@ Python 2.4), py2exe-0.6.9.win32-py2.5.exe_ (for Python 2.5), py2exe-0.6.9.win64-py2.5.amd64.msi_ (for 64-bit Python 2.5), py2exe-0.6.9.win32-py2.6.exe_ (for Python 2.6), -py2exe-0.6.9.win64-py2.6.amd64.msi_ (for 64-bit Python 2.6), +py2exe-0.6.9.win64-py2.6.amd64.exe_ (for 64-bit Python 2.6), py2exe-0.6.9.win32-py2.7.exe_ (for Python 2.7), or -py2exe-0.6.9.win64-py2.7.amd64.msi_ (for 64-bit Python 2.7). +py2exe-0.6.9.win64-py2.7.amd64.exe_ (for 64-bit Python 2.7). This installs **py2exe** together with some samples, the samples are in the ``lib\site-packages\py2exe\samples`` subdirectory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-16 06:07:46
|
Revision: 679 http://py2exe.svn.sourceforge.net/py2exe/?rev=679&view=rev Author: jretz Date: 2008-11-16 06:07:44 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Include mention of Python 2.7 in ANNOUNCE and py2exe.txt. Modified Paths: -------------- trunk/py2exe/ANNOUNCE trunk/py2exe/docs/py2exe.txt Modified: trunk/py2exe/ANNOUNCE =================================================================== --- trunk/py2exe/ANNOUNCE 2008-11-10 18:32:49 UTC (rev 678) +++ trunk/py2exe/ANNOUNCE 2008-11-16 06:07:44 UTC (rev 679) @@ -8,7 +8,7 @@ Changes in 0.6.9: - * Binaries for Python 2.6. + * Binaries for Python 2.6 and Python 2.7. * Fixed a modulefinder crash on certain relative imports. Modified: trunk/py2exe/docs/py2exe.txt =================================================================== --- trunk/py2exe/docs/py2exe.txt 2008-11-10 18:32:49 UTC (rev 678) +++ trunk/py2exe/docs/py2exe.txt 2008-11-16 06:07:44 UTC (rev 679) @@ -13,10 +13,16 @@ .. _py2exe-0.6.9.win32-py2.5.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.5.exe?download -.. _py2exe-0.6.9.win64-py2.5.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.0.win64-py2.5.amd64.msi?download +.. _py2exe-0.6.9.win64-py2.5.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.5.amd64.msi?download .. _py2exe-0.6.9.win32-py2.6.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.6.exe?download +.. _py2exe-0.6.9.win64-py2.6.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.6.amd64.msi?download + +.. _py2exe-0.6.9.win32-py2.7.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.7.exe?download + +.. _py2exe-0.6.9.win64-py2.7.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win64-py2.7.amd64.msi?download + .. _WIKI: http://www.py2exe.org/ .. _SourceForge: http://sourceforge.net/projects/py2exe/ @@ -63,7 +69,7 @@ **py2exe 0.6.9 released (2008/11/15)** -Binaries for Python 2.6. +Binaries for Python 2.6 and Python 2.7. Fixed a modulefinder crash on certain relative imports. @@ -413,8 +419,11 @@ Download and run the installer py2exe-0.6.9.win32-py2.3.exe_ (for Python 2.3), py2exe-0.6.9.win32-py2.4.exe_ (for Python 2.4), py2exe-0.6.9.win32-py2.5.exe_ (for Python 2.5), -py2exe-0.6.9.win64-py2.5.amd64.msi_ (for 64-bit Python 2.5), or -py2exe-0.6.9.win32-py2.6.exe_ (for Python 2.6). +py2exe-0.6.9.win64-py2.5.amd64.msi_ (for 64-bit Python 2.5), +py2exe-0.6.9.win32-py2.6.exe_ (for Python 2.6), +py2exe-0.6.9.win64-py2.6.amd64.msi_ (for 64-bit Python 2.6), +py2exe-0.6.9.win32-py2.7.exe_ (for Python 2.7), or +py2exe-0.6.9.win64-py2.7.amd64.msi_ (for 64-bit Python 2.7). This installs **py2exe** together with some samples, the samples are in the ``lib\site-packages\py2exe\samples`` subdirectory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2008-11-10 18:32:52
|
Revision: 678 http://py2exe.svn.sourceforge.net/py2exe/?rev=678&view=rev Author: theller Date: 2008-11-10 18:32:49 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Correct the wiki link. Modified Paths: -------------- trunk/py2exe/docs/py2exe.txt Modified: trunk/py2exe/docs/py2exe.txt =================================================================== --- trunk/py2exe/docs/py2exe.txt 2008-11-10 07:32:43 UTC (rev 677) +++ trunk/py2exe/docs/py2exe.txt 2008-11-10 18:32:49 UTC (rev 678) @@ -17,7 +17,7 @@ .. _py2exe-0.6.9.win32-py2.6.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.6.exe?download -.. _WIKI: http://starship.python.net/crew/theller/moin.cgi/Py2Exe +.. _WIKI: http://www.py2exe.org/ .. _SourceForge: http://sourceforge.net/projects/py2exe/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-10 07:32:50
|
Revision: 677 http://py2exe.svn.sourceforge.net/py2exe/?rev=677&view=rev Author: jretz Date: 2008-11-10 07:32:43 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Updated version numbers, news, and copyright dates in preparation for the 0.6.9 release. Modified Paths: -------------- trunk/py2exe/ANNOUNCE trunk/py2exe/docs/LICENSE.txt trunk/py2exe/docs/py2exe.txt trunk/py2exe/py2exe/__init__.py trunk/py2exe/setup.py Modified: trunk/py2exe/ANNOUNCE =================================================================== --- trunk/py2exe/ANNOUNCE 2008-11-10 07:27:18 UTC (rev 676) +++ trunk/py2exe/ANNOUNCE 2008-11-10 07:32:43 UTC (rev 677) @@ -1,4 +1,4 @@ -py2exe 0.6.8 released +py2exe 0.6.9 released ===================== py2exe is a Python distutils extension which converts Python scripts @@ -6,6 +6,24 @@ Python installation. Console and Windows (GUI) applications, Windows NT services, exe and dll COM servers are supported. +Changes in 0.6.9: + + * Binaries for Python 2.6. + + * Fixed a modulefinder crash on certain relative imports. + + * Changed the py2exe\samples\singlefile\gui\test_wx.py sample to + use the wx package instead of the old wxPython package. + + * Copy the manifest, if any, from the 'template' into the targets + to ensure embedded assembly references, as required for python 2.6 based + apps, are copied. + + * Allow each target to specify Vista User Access Control flags. For + example, specifying 'uac_execution_info="requireAdministrator"' would + force elevation for the final executable. + + Changes in 0.6.8: * Support for relative imports. Modified: trunk/py2exe/docs/LICENSE.txt =================================================================== --- trunk/py2exe/docs/LICENSE.txt 2008-11-10 07:27:18 UTC (rev 676) +++ trunk/py2exe/docs/LICENSE.txt 2008-11-10 07:32:43 UTC (rev 677) @@ -1,4 +1,4 @@ -Copyright (c) 2000-2005 Thomas Heller, Mark Hammond, Jimmy Retzlaff +Copyright (c) 2000-2008 Thomas Heller, Mark Hammond, Jimmy Retzlaff Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Modified: trunk/py2exe/docs/py2exe.txt =================================================================== --- trunk/py2exe/docs/py2exe.txt 2008-11-10 07:27:18 UTC (rev 676) +++ trunk/py2exe/docs/py2exe.txt 2008-11-10 07:32:43 UTC (rev 677) @@ -7,14 +7,16 @@ .. _setup-script: http://www.python.org/doc/current/dist/setup-script.html -.. _py2exe-0.6.8.win32-py2.3.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.8.win32-py2.3.exe?download +.. _py2exe-0.6.9.win32-py2.3.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.3.exe?download -.. _py2exe-0.6.8.win32-py2.4.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.8.win32-py2.4.exe?download +.. _py2exe-0.6.9.win32-py2.4.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.4.exe?download -.. _py2exe-0.6.8.win32-py2.5.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.8.win32-py2.5.exe?download +.. _py2exe-0.6.9.win32-py2.5.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.5.exe?download -.. _py2exe-0.6.8.win64-py2.5.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.8.win64-py2.5.amd64.msi?download +.. _py2exe-0.6.9.win64-py2.5.amd64.msi: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.0.win64-py2.5.amd64.msi?download +.. _py2exe-0.6.9.win32-py2.6.exe: http://prdownloads.sourceforge.net/py2exe/py2exe-0.6.9.win32-py2.6.exe?download + .. _WIKI: http://starship.python.net/crew/theller/moin.cgi/Py2Exe .. _SourceForge: http://sourceforge.net/projects/py2exe/ @@ -59,6 +61,18 @@ News ---- +**py2exe 0.6.9 released (2008/11/15)** + +Binaries for Python 2.6. + +Fixed a modulefinder crash on certain relative imports. + +Changed the py2exe\samples\singlefile\gui\test_wx.py sample to use the wx package instead of the old wxPython package. + +Copy the manifest, if any, from the 'template' into the targets to ensure embedded assembly references, as required for python 2.6 based apps, are copied. + +Allow each target to specify Vista User Access Control flags. For example, specifying 'uac_execution_info="requireAdministrator"' would force elevation for the final executable. + **py2exe 0.6.8 released (2008/06/15)** Support for relative imports. @@ -396,9 +410,11 @@ Installing py2exe ----------------- -Download and run the installer py2exe-0.6.8.win32-py2.3.exe_ (for -Python 2.3), py2exe-0.6.8.win32-py2.4.exe_ (for -Python 2.4), py2exe-0.6.8.win32-py2.5.exe_ (for Python 2.5), or py2exe-0.6.8.win64-py2.5.amd64.msi_ (for 64-bit Python 2.5). +Download and run the installer py2exe-0.6.9.win32-py2.3.exe_ (for +Python 2.3), py2exe-0.6.9.win32-py2.4.exe_ (for +Python 2.4), py2exe-0.6.9.win32-py2.5.exe_ (for Python 2.5), +py2exe-0.6.9.win64-py2.5.amd64.msi_ (for 64-bit Python 2.5), or +py2exe-0.6.9.win32-py2.6.exe_ (for Python 2.6). This installs **py2exe** together with some samples, the samples are in the ``lib\site-packages\py2exe\samples`` subdirectory. Modified: trunk/py2exe/py2exe/__init__.py =================================================================== --- trunk/py2exe/py2exe/__init__.py 2008-11-10 07:27:18 UTC (rev 676) +++ trunk/py2exe/py2exe/__init__.py 2008-11-10 07:32:43 UTC (rev 677) @@ -62,7 +62,7 @@ # special one contained in this module. # -__version__ = "0.6.8" +__version__ = "0.6.9" import distutils.dist, distutils.core, distutils.command, build_exe, sys Modified: trunk/py2exe/setup.py =================================================================== --- trunk/py2exe/setup.py 2008-11-10 07:27:18 UTC (rev 676) +++ trunk/py2exe/setup.py 2008-11-10 07:32:43 UTC (rev 677) @@ -1,6 +1,6 @@ #!/usr/bin/python ## -## Copyright (c) 2000-2005 Thomas Heller, Jimmy Retzlaff +## Copyright (c) 2000-2008 Thomas Heller, Jimmy Retzlaff ## ## Permission is hereby granted, free of charge, to any person obtaining ## a copy of this software and associated documentation files (the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2008-11-10 07:27:25
|
Revision: 676 http://py2exe.svn.sourceforge.net/py2exe/?rev=676&view=rev Author: jretz Date: 2008-11-10 07:27:18 +0000 (Mon, 10 Nov 2008) Log Message: ----------- Use the right version of the interpreter for testing py2exe (why was it even working before?). Modified Paths: -------------- trunk/py2exe/test/test.py Modified: trunk/py2exe/test/test.py =================================================================== --- trunk/py2exe/test/test.py 2008-11-07 06:49:39 UTC (rev 675) +++ trunk/py2exe/test/test.py 2008-11-10 07:27:18 UTC (rev 676) @@ -130,7 +130,7 @@ open(generatedSetup, 'wt').write(open(test.replace('test_', 'setup_'), 'rt').read() % test) else: open(generatedSetup, 'wt').write(py2exeTemplate % test) - run(sys.executable, generatedSetup, 'py2exe', option) + run(interpreter, generatedSetup, 'py2exe', option) # Run exe and test against baseline os.rename(exe, exe2) # ensure that the exe works when renamed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2008-11-07 06:49:46
|
Revision: 675 http://py2exe.svn.sourceforge.net/py2exe/?rev=675&view=rev Author: theller Date: 2008-11-07 06:49:39 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Fix modulefinder crash on certain relative imports. Modified Paths: -------------- trunk/py2exe/ChangeLog trunk/py2exe/py2exe/mf.py trunk/py2exe/test/relative_import/x/__init__.py trunk/py2exe/test/test_relative_import.py Modified: trunk/py2exe/ChangeLog =================================================================== --- trunk/py2exe/ChangeLog 2008-11-01 12:37:24 UTC (rev 674) +++ trunk/py2exe/ChangeLog 2008-11-07 06:49:39 UTC (rev 675) @@ -1,3 +1,7 @@ +2008-11-06 Thomas Heller <th...@py...> + + * Fixed a modulefinder crash on certain relative imports. + 2008-11-01 Thomas Heller <th...@py...> * Changed the py2exe\samples\singlefile\gui\test_wx.py sample to Modified: trunk/py2exe/py2exe/mf.py =================================================================== --- trunk/py2exe/py2exe/mf.py 2008-11-01 12:37:24 UTC (rev 674) +++ trunk/py2exe/py2exe/mf.py 2008-11-07 06:49:39 UTC (rev 675) @@ -318,7 +318,10 @@ def _add_badmodule(self, name, caller): if name not in self.badmodules: self.badmodules[name] = {} - self.badmodules[name][caller.__name__] = 1 + if caller: + self.badmodules[name][caller.__name__] = 1 + else: + self.badmodules[name]["-"] = 1 def _safe_import_hook(self, name, caller, fromlist, level=-1): # wrapper for self.import_hook() that won't raise ImportError Modified: trunk/py2exe/test/relative_import/x/__init__.py =================================================================== --- trunk/py2exe/test/relative_import/x/__init__.py 2008-11-01 12:37:24 UTC (rev 674) +++ trunk/py2exe/test/relative_import/x/__init__.py 2008-11-07 06:49:39 UTC (rev 675) @@ -2,3 +2,5 @@ import sys as a from .. import sys as b + +def foo(): pass Modified: trunk/py2exe/test/test_relative_import.py =================================================================== --- trunk/py2exe/test/test_relative_import.py 2008-11-01 12:37:24 UTC (rev 674) +++ trunk/py2exe/test/test_relative_import.py 2008-11-07 06:49:39 UTC (rev 675) @@ -1,4 +1,5 @@ import relative_import.x +import relative_import.x.module if __name__ == "__main__": print relative_import.x.a.maxint This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2008-11-01 12:37:32
|
Revision: 674 http://py2exe.svn.sourceforge.net/py2exe/?rev=674&view=rev Author: theller Date: 2008-11-01 12:37:24 +0000 (Sat, 01 Nov 2008) Log Message: ----------- Changed sample to use the wx package instead of the old wxPython package. Modified Paths: -------------- trunk/py2exe/ChangeLog trunk/py2exe/py2exe/samples/singlefile/gui/test_wx.py Modified: trunk/py2exe/ChangeLog =================================================================== --- trunk/py2exe/ChangeLog 2008-11-01 12:29:42 UTC (rev 673) +++ trunk/py2exe/ChangeLog 2008-11-01 12:37:24 UTC (rev 674) @@ -1,3 +1,8 @@ +2008-11-01 Thomas Heller <th...@py...> + + * Changed the py2exe\samples\singlefile\gui\test_wx.py sample to + use the wx package instead of the old wxPython package. + 2008-08-28 Mark Hammond <mha...@sk...> * Copy the manifest, if any, from the 'template' into the targets Modified: trunk/py2exe/py2exe/samples/singlefile/gui/test_wx.py =================================================================== --- trunk/py2exe/py2exe/samples/singlefile/gui/test_wx.py 2008-11-01 12:29:42 UTC (rev 673) +++ trunk/py2exe/py2exe/samples/singlefile/gui/test_wx.py 2008-11-01 12:37:24 UTC (rev 674) @@ -1,31 +1,32 @@ -from wxPython.wx import * +import sys +import wx # By default the executables created by py2exe write output to stderr # into a logfile and display a messagebox at program end when there # has been any output. This logger silently overrides the default -# behaviour by silently shallowing everything. +# behaviour by silently swallowing everything. -class logger: - def write(self, text): - pass # silently ignore everything +if hasattr(sys, "frozen"): + class logger: + def write(self, text): + pass # silently ignore everything -import sys -sys.stdout = sys.stderr = logger() + sys.stdout = sys.stderr = logger() -class MyFrame(wxFrame): - def __init__(self, parent, ID, title, pos=wxDefaultPosition, - size=(200, 200), style=wxDEFAULT_FRAME_STYLE): - wxFrame.__init__(self, parent, ID, title, pos, size, style) - panel = wxPanel(self, -1) +class MyFrame(wx.Frame): + def __init__(self, parent, ID, title, pos=wx.DefaultPosition, + size=(200, 200), style=wx.DEFAULT_FRAME_STYLE): + wx.Frame.__init__(self, parent, ID, title, pos, size, style) + panel = wx.Panel(self, -1) - button = wxButton(panel, 1003, "Close Me") - button.SetPosition(wxPoint(15, 15)) - EVT_BUTTON(self, 1003, self.OnCloseMe) - EVT_CLOSE(self, self.OnCloseWindow) + button = wx.Button(panel, 1003, "Close Me") + button.SetPosition(wx.Point(15, 15)) + wx.EVT_BUTTON(self, 1003, self.OnCloseMe) + wx.EVT_CLOSE(self, self.OnCloseWindow) - button = wxButton(panel, 1004, "Press Me") - button.SetPosition(wxPoint(15, 45)) - EVT_BUTTON(self, 1004, self.OnPressMe) + button = wx.Button(panel, 1004, "Press Me") + button.SetPosition(wx.Point(15, 45)) + wx.EVT_BUTTON(self, 1004, self.OnPressMe) def OnCloseMe(self, event): self.Close(True) @@ -37,12 +38,13 @@ def OnCloseWindow(self, event): self.Destroy() -class MyApp(wxApp): +class MyApp(wx.App): def OnInit(self): - frame = MyFrame(NULL, -1, "Hello from wxPython") - frame.Show(true) + frame = MyFrame(None, -1, "Hello from wxPython") + frame.Show(True) self.SetTopWindow(frame) - return true + return True -app = MyApp(0) -app.MainLoop() +if __name__ == "__main__": + app = MyApp(0) + app.MainLoop() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <th...@us...> - 2008-11-01 12:29:50
|
Revision: 673 http://py2exe.svn.sourceforge.net/py2exe/?rev=673&view=rev Author: theller Date: 2008-11-01 12:29:42 +0000 (Sat, 01 Nov 2008) Log Message: ----------- Fix typo. Modified Paths: -------------- trunk/py2exe/ChangeLog Modified: trunk/py2exe/ChangeLog =================================================================== --- trunk/py2exe/ChangeLog 2008-09-06 18:05:55 UTC (rev 672) +++ trunk/py2exe/ChangeLog 2008-11-01 12:29:42 UTC (rev 673) @@ -93,7 +93,7 @@ * test: * Run all tests with and without the --compression option - this catches the problems zlib problem with Python 2.5. - * Added a test case that cathces the sys.path regression. + * Added a test case that catches the sys.path regression. 2006-10-24 Mark Hammond <mha...@sk...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |