[Pythonmac-SIG] py2app uses wrong version of wxPython?

2005-12-15 Thread Erik Westra
Greetings,

I've been successfully using py2app for about a year now to build an  
application bundle out of a large wxPython application I've  
developed.  Recently, I upgraded my development machine to OSX  
10.4.2, and installed wxPython 2.6.1.0 and py2app 0.2.  I'm using the  
Apple-supplied Python interpreter (version 2.3.5) and the  
"TigerPython23Compat.pkg" package to ensure that the Python  
interpreter finds wxPython 2.6.1.0 instead of the Apple-suppled  
version 2.5.3.

This works fine when my application is run directly from the command- 
line -- a simple "import wx" correctly imports version 2.6.1.0 and  
the application runs as normal.  However, when I use py2app to create  
an application bundle, the resulting application starts up, but soon  
crashes because it's running a completely different version of  
wxPython -- not version 2.5.3, which would make some sense, but  
version 2.6.0.1!

The weird thing is that I never installed wxPython 2.6.0.1 on my  
machine -- the /Library/Python/2.3/wx-2.6-mac-ansi/wx/__version__.py  
file definitely shows the version as 2.6.1.0, and I used "grep" to  
search for the string "2.6.0.1" in "/Library" and "/System", without  
success.  So I'm at a complete loss to understand how an application  
bundle created using py2app could use a version of wxPython I never  
installed.

I'm not sure if the problem is an obscure bug in py2app, if something  
is screwed up in the wxPython 2.6.1.0 library (maybe it includes the  
wrong version of an .so files or something), or if I've done  
something stupid to cause the problem myself.  But, whatever the  
cause, it seems very strange that the following code:

 import wx
 print wx.__version__

prints "2.6.1.0" when run in the Python interpreter, but prints  
"2.6.0.1" when run as an application bundle built using py2app.

Any suggestions?

Note: I'm not using wxversion to choose the version of wxPython to  
use, so that shouldn't be causing any problems.

In case it helps, here's a (simplified) copy of the "setup.py" file  
I'm using to build the application using py2app:

###

""" setup.py

 Simplified py2app setup script for the "Ensemble" application.
"""
from distutils.core import setup
import py2app
import sys
import os


def rmrf(path):
 """ Delete the given directory tree.
 """
 entries=os.listdir(path)
 for e in entries:
 fullname=os.path.join(path,e)
 if os.path.isdir(fullname):
 rmrf(fullname)
 else:
 os.remove(fullname)
 os.rmdir(path)


def buildApp():
 """ Build our standalone application, using py2app.

 We store our generated Ensemble.app bundle into the
 ensemble/build-mac/standalone directory.
 """
 if os.path.exists("disk-image"):
 rmrf("disk-image")

 os.mkdir("disk-image")
 os.mkdir("disk-image/dNet Ensemble")

 sys.path.insert(0, "../framework") # Won't be necessary with  
py2app v0.1.7

 plist = dict(
 CFBundleIconFile= "Ensemble",
 CFBundleName= "dNet Ensemble",
 CFBundleShortVersionString  = "2.x",
 CFBundleGetInfoString   = "dNet Ensemble 2.x",
 CFBundleExecutable  = "dNet Ensemble",
 CFBundleIdentifier  = "com.dnet.ensemble",
 )

 app = dict(script="../framework/main.py")

 setup(
 app=[app],
 options={'py2app' : {'bdist_base' : "temp",
  'dist_dir'   : "disk-image/dNet Ensemble",
  'iconfile'   : "Ensemble.icns",
  'plist'  : plist,
  'includes'   : "requiredModules",
 },
 }
 )


if __name__ == "__main__":
 buildApp()

###

Thanks in advance for any suggestions you may have!

  - Erik.
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app uses wrong version of wxPython?

2005-12-15 Thread bray
I am not sure if this will helpful to you or not. But I did recall
something on VersionSelect, found here
.

Otherwise, take a look at you environment variables from the command
line and compare this to what is set for py2app.

Brian



___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] appscript installer 1.2 - looking for feedback

2005-12-15 Thread has
Hi folks,

Just posted a preview of the next appscript installer package at:

http://freespace.virgin.net/hamish.sanderson/Appscript-Installer-1.2.dmg.gz

Unfortunately, Nick's too busy with real life work these days so this one's 
built by me. Contains installers for Python 2.3 and 2.4 on both OS 10.3 and 
10.4. I've rearranged some stuff and it's not very polished, but seems to work 
okay at this end. If a few folk would like to give it a try and let me know if 
everything's okay or not before I do the official release it would be much 
appreciated.

Thanks,

has
-- 
http://freespace.virgin.net/hamish.sanderson/
___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app uses wrong version of wxPython?

2005-12-15 Thread Kevin Ollivier

On Dec 14, 2005, at 11:36 AM, Erik Westra wrote:

[snip]

> I'm not sure if the problem is an obscure bug in py2app, if something
> is screwed up in the wxPython 2.6.1.0 library (maybe it includes the
> wrong version of an .so files or something), or if I've done
> something stupid to cause the problem myself.  But, whatever the
> cause, it seems very strange that the following code:
>
>  import wx
>  print wx.__version__
>
> prints "2.6.1.0" when run in the Python interpreter, but prints
> "2.6.0.1" when run as an application bundle built using py2app.
>
> Any suggestions?

When you run py2app, the output should indicate exactly where it is  
getting the wxPython scripts and dlls from. Search the py2app output  
for any instances of 'wx' in the filename, then track down those  
locations and see what the wxPython version is there. I've released  
bundles using 2.6.1.0 so I don't think that in and of itself is the  
problem here.

Thanks,

Kevin

> Note: I'm not using wxversion to choose the version of wxPython to
> use, so that shouldn't be causing any problems.
>
> In case it helps, here's a (simplified) copy of the "setup.py" file
> I'm using to build the application using py2app:
>
> ## 
> #
>
> """ setup.py
>
>  Simplified py2app setup script for the "Ensemble" application.
> """
> from distutils.core import setup
> import py2app
> import sys
> import os
>
>
> def rmrf(path):
>  """ Delete the given directory tree.
>  """
>  entries=os.listdir(path)
>  for e in entries:
>  fullname=os.path.join(path,e)
>  if os.path.isdir(fullname):
>  rmrf(fullname)
>  else:
>  os.remove(fullname)
>  os.rmdir(path)
>
>
> def buildApp():
>  """ Build our standalone application, using py2app.
>
>  We store our generated Ensemble.app bundle into the
>  ensemble/build-mac/standalone directory.
>  """
>  if os.path.exists("disk-image"):
>  rmrf("disk-image")
>
>  os.mkdir("disk-image")
>  os.mkdir("disk-image/dNet Ensemble")
>
>  sys.path.insert(0, "../framework") # Won't be necessary with
> py2app v0.1.7
>
>  plist = dict(
>  CFBundleIconFile= "Ensemble",
>  CFBundleName= "dNet Ensemble",
>  CFBundleShortVersionString  = "2.x",
>  CFBundleGetInfoString   = "dNet Ensemble 2.x",
>  CFBundleExecutable  = "dNet Ensemble",
>  CFBundleIdentifier  = "com.dnet.ensemble",
>  )
>
>  app = dict(script="../framework/main.py")
>
>  setup(
>  app=[app],
>  options={'py2app' : {'bdist_base' : "temp",
>   'dist_dir'   : "disk-image/dNet  
> Ensemble",
>   'iconfile'   : "Ensemble.icns",
>   'plist'  : plist,
>   'includes'   : "requiredModules",
>  },
>  }
>  )
>
>
> if __name__ == "__main__":
>  buildApp()
>
> ## 
> #
>
> Thanks in advance for any suggestions you may have!
>
>   - Erik.
> ___
> Pythonmac-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig