Re: py2app failure with framework build of 2.7

Ronald Oussoren <[email protected]>
Newsgroups gmane.comp.python.apple
Message-ID <[email protected]>
On 4 Apr, 2013, at 1:12, Nat Echols <[email protected]> wrote:

> Replying to my own post: after sending this, I read the section in the
> documentation about "alias mode".  This seems to work fine, and
> produces an app that is 50KB instead of nearly 9MB.  Since I'm running
> this script as part of a complicated build and installation process,
> and the path to the interpreter and all modules is frozen by the time
> I need to make my app, it would seem that alias mode should work fine
> for actually *deploying* my software.  Is there any drawback to doing
> this?

An alias mode build contains symlinks to the python files in your application, and is therefore not a useful way to deploy.

I don't know yet why building the application fails, I'll try to reproduce the issue in the weekend.

Ronald

> 
> thanks,
> Nat
> 
> On Wed, Apr 3, 2013 at 3:45 PM, Nat Echols <[email protected]> wrote:
>> I'm trying to make a simple iconified Python launcher for a shell
>> script, and something I'm doing isn't working, despite having used
>> py2app successfully before.  The target Python program
>> ("my_program_wrapper.py") consists of this:
>> 
>> import os
>> import sys
>> os.environ["PYTHONPATH"] = ""
>> os.spawnv(os.P_NOWAIT, "/Users/nat/bin/my_program", ["my_program"])
>> 
>> I then run this:
>> 
>> /path/to/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
>> Python.framework/Versions/Current/lib/python2.7/site-packages/py2app-0.7.3-py2.7.egg/py2app/script_py2applet.py
>> --make-setup my_program_wrapper.py
>> 
>> which is fine, and gives me this for setup.py:
>> 
>> ####
>> from setuptools import setup
>> 
>> APP = ['my_program_wrapper.py']
>> DATA_FILES = []
>> OPTIONS = {'argv_emulation': False,
>> 'iconfile': '/Users/nat/my_program.icns'}
>> 
>> setup(
>>    app=APP,
>>    data_files=DATA_FILES,
>>    options={'py2app': OPTIONS},
>>    setup_requires=['py2app'],
>> )
>> ####
>> 
>> Then I run this:
>> 
>> /path/to/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
>> setup.py py2app
>> 
>> and that runs for a few seconds, prints a bunch of output, then crashes here:
>> 
>> creating /Users/nat/Desktop/py2app_tmp/py2app_tmp/dist/phenix.app/Contents/Frameworks/Python.framework
>> creating /Users/nat/Desktop/py2app_tmp/py2app_tmp/dist/phenix.app/Contents/Frameworks/Python.framework/Versions
>> creating /Users/nat/Desktop/py2app_tmp/py2app_tmp/dist/phenix.app/Contents/Frameworks/Python.framework/Versions/Current
>> creating /Users/nat/Desktop/py2app_tmp/py2app_tmp/dist/phenix.app/Contents/Frameworks/Python.framework/Versions/Current/Resources
>> error: File exists
>> 
>> It works fine if I use /usr/bin/python instead, but that isn't an
>> option because this needs to be able to run on OS 10.4, which has
>> Python 2.3 (which chokes on an import in py2app).  Am I doing
>> something wrong, or is this a bug?
>> 
>> thanks,
>> Nat
> _______________________________________________
> Pythonmac-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.