Re: [Pythonmac-SIG] Problem with py2app 0.6
On 4 Apr, 2011, at 21:04, Russell E. Owen wrote: In article c3b25d01-d9ed-494e-96b6-316136f48...@uw.edu, Russell Owen ro...@uw.edu wrote: On 29 Mar, 2011, at 22:02, Russell E. Owen wrote: I used easy_install to install py2app 0.6 and tried it out on one of several applications I distribute. Unfortunately the build failed with; The testsuite is obviously not good enough yet to catch all errors. I've done some changes in how py2app deals with source files to clean up the code that deals with zipped egg files, and that obviously introduced a problem. Ronald Oussoren fixed the problem in the current py2app trunk, which is a prerelease of 0.6.2. I forgot to report that the fix is already in release 0.6.1. Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Problem with py2app 0.6
In article c3b25d01-d9ed-494e-96b6-316136f48...@uw.edu, Russell Owen ro...@uw.edu wrote: On 29 Mar, 2011, at 22:02, Russell E. Owen wrote: I used easy_install to install py2app 0.6 and tried it out on one of several applications I distribute. Unfortunately the build failed with; The testsuite is obviously not good enough yet to catch all errors. I've done some changes in how py2app deals with source files to clean up the code that deals with zipped egg files, and that obviously introduced a problem. Ronald Oussoren fixed the problem in the current py2app trunk, which is a prerelease of 0.6.2. Thank you very much for the quick fix (which happened last week, but I only today had a chance to test it). -- Russell ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Problem with py2app 0.6
On 29 Mar, 2011, at 22:02, Russell E. Owen wrote: I used easy_install to install py2app 0.6 and tried it out on one of several applications I distribute. Unfortunately the build failed with; The testsuite is obviously not good enough yet to catch all errors. I've done some changes in how py2app deals with source files to clean up the code that deals with zipped egg files, and that obviously introduced a problem. I'll look into this, but that will at best be tonight (in CEST), and otherwise next sunday. BTW. Which version of python do you use? This is not related to this issue, but why do you use inclModules and inclPackages? Does py2app not copy those resources automaticly? And if not, do you use dynamic imports or only import statements? Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Problem with py2app 0.6
On Mar 29, 2011, at 10:58 PM, Ronald Oussoren wrote: On 29 Mar, 2011, at 22:02, Russell E. Owen wrote: I used easy_install to install py2app 0.6 and tried it out on one of several applications I distribute. Unfortunately the build failed with; The testsuite is obviously not good enough yet to catch all errors. I've done some changes in how py2app deals with source files to clean up the code that deals with zipped egg files, and that obviously introduced a problem. I'll look into this, but that will at best be tonight (in CEST), and otherwise next sunday. Thank you. No rush. The old version (which I saved by archiving my site-packages) works fine. (My code has is a fairly severe test of py2app, so I upgrade cautiously.) Let me know if there are any tests you want performed. BTW. Which version of python do you use? That result was with Python 2.6.6 (from python.org). This is not related to this issue, but why do you use inclModules and inclPackages? Does py2app not copy those resources automaticly? And if not, do you use dynamic imports or only import statements? For the most part it's due to dynamic loading. The application (named TUI) supports dynamically loaded scripts which may use any part of TUI, RO or matplotlib. I want to be sure the full packages are available even if some bits aren't used by the statically loaded main code. I'm not sure why that one Tk dialog module needs to be manually specified; certainly at one time if I didn't specify it then the application would fail. Maybe it's no longer needed. (Scripts don't use dialog boxes, so it's not due to dynamic loading). BTW: I'm also not allowing my code to be zipped up because I use __file__ to locate some non-code resources and the dynamically loaded scripts. I should convert that code but I'm not sure if there's a standard technique that will have long-term support. I recall that the 3rd party setuptools has something, but easy_install seems to be in flux. -- Russell ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Problem with py2app 0.6
On 3/30/11 8:25 AM, Russell Owen wrote: BTW: I'm also not allowing my code to be zipped up because I use __file__ to locate some non-code resources and the dynamically loaded scripts. I should convert that code but I'm not sure if there's a standard technique that will have long-term support. I recall that the 3rd party setuptools has something, but easy_install seems to be in flux. Indeed setuptools does provide that feature, but frankly, it doesn't work well with py2app (or py2exe) packages. You can get it to work but only by copying the entire egg into the bundle as-is, and hand-including setuptools itself (that may have changed, I haven't tried lately). In short, your __file__ method is probably easier to deal with, as you know exactly what it's doing. py2app has its own way of dealing with non-code resources, but it's really for application specific resources, rather than package-specific. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
[Pythonmac-SIG] Problem with py2app 0.6
I used easy_install to install py2app 0.6 and tried it out on one of several applications I distribute. Unfortunately the build failed with; *** using recipe: virtualenv *** *** using recipe: PIL *** *** using recipe: matplotlib *** *** using recipe: pydoc *** *** using recipe: scipy *** *** using recipe: pygame *** *** using recipe: numpy *** *** filtering dependencies *** 1156 total 82 filtered 11 orphaned 1074 remaining *** create binaries *** *** byte compile python files *** XXX byte-compiling fn=/Users/rowen/TUI_1.8.6_Source/BuildForMac/build/bdist.macosx-10.4-fat/ python2.6-standalone/app/collect/ConfigParser.pyc.py cfile=/Users/rowen/TUI_1.8.6_Source/BuildForMac/build/bdist.macosx-10.4-f at/python2.6-standalone/app/collect/ConfigParser.pyc dfile=ConfigParser.pyc ... XXX byte-compiling fn=/Users/rowen/TUI_1.8.6_Source/BuildForMac/build/bdist.macosx-10.4-fat/ python2.6-standalone/app/collect/pygame/transform.pyc.py cfile=/Users/rowen/TUI_1.8.6_Source/BuildForMac/build/bdist.macosx-10.4-f at/python2.6-standalone/app/collect/pygame/transform.pyc dfile=pygame/transform.pyc error: cannot copy tree '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/test/zip dir.zip': not a directory I've never heard of the file in the error message (.../test/zipdir.zip) but it does in fact exist. I have appended my setup.py in case it is of any help. -- Russell My setup.py: import os import platform from plistlib import Plist import shutil import subprocess import sys from setuptools import setup # If True a universal binary is built; if False a PPC-only version is built # Only set true if all extensions are universal binaries and Aqua Tcl/Tk is sufficiently reliable UniversalBinaryOK = True # add tuiRoot to sys.path before importing RO or TUI tuiRoot = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) roRoot = os.path.join(tuiRoot, ROPackage) sys.path = [roRoot, tuiRoot] + sys.path import TUI.Version appName = TUI.Version.ApplicationName mainProg = os.path.join(tuiRoot, runtuiWithLog.py) iconFile = %s.icns % appName appPath = os.path.join(dist, %s.app % (appName,)) contentsDir = os.path.join(appPath, Contents) fullVersStr = TUI.Version.VersionStr shortVersStr = fullVersStr.split(None, 1)[0] inclModules = ( FileDialog, ) # packages to include recursively inclPackages = ( TUI, RO, matplotlib, # py2app already does this, but it doesn't hurt to insist ) plist = Plist( CFBundleName= appName, CFBundleShortVersionString = shortVersStr, CFBundleGetInfoString = %s %s % (appName, fullVersStr), CFBundleExecutable = appName, LSPrefersPPC= not UniversalBinaryOK, ) setup( app = [mainProg], setup_requires = [py2app], options = dict( py2app = dict ( plist = plist, iconfile = iconFile, includes = inclModules, packages = inclPackages, ) ), ) ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG