Charles,

That seems normal. Here's a bash script I use for compiling my application. I don't mess with the setup.py once it's generated, and this bash script seems to do the trick.

rm -r build
rm -r dist

py2applet --make-setup Decoder.py
python setup.py py2app --include DUtils,LabVIEWWrapper --packages PyDrill,mx,Ft,ZODB,persistent,transaction,zope --resources config.xml,file1.xml,file2.xml,file3.xml,logs > compile.log

cp -r /usr/local/Zope-3.3.1-Python2.5/lib/python/zope/interface / Teledrill/Applications/Python/Decoder/dist/Decoder.app/Contents/ Resources/lib/pytho
n2.5/zope/

The first two lines simply clean out the old build.
The third line creates the setup.py file.
The fourth line actually compiles the app. The include files are two .py files, local modules, that i need to include. The packages are python packages on the python path that I want to include for use. The resources are include files that my app needs, i've obscured their actual names, and the command dumps out to a log. The last line is a really silly way to correct a bug in py2app. When i tell it to include zope, it doesn't include the "interface" sub- module, so I forcefully copy it into the app.

I'm not sure if this is the right way to do it, but it's worked for me so far.

Good luck.

Also feel free to ask any time. I ask questions all of the time.

Regards,
Kenneth Miller

On Jan 19, 2008, at 6:59 PM, Charles Hartman wrote:

Hm. I'm very puzzled. I tried
        python setup.py py2app -A
and ended up with a tiny 192Kb "application." It runs fine on my machine. But it surely doesn't have a Python built into it, at that size. (The regular "python setup.py py2app" produces a monstrous 40Mb file.)

I don't mean to keep nagging you for help. Where's the best place to find an explanation of the details of this?

Many thanks.

Charles Hartman

On Jan 19, 2008, at 6:19 PM, Kenneth Miller wrote:

No, it bundles a python binary along with your source in a .app package.

Regards,
Kenneth Miller

On Jan 19, 2008, at 4:55 PM, Charles Hartman <[EMAIL PROTECTED] > wrote:

Thank you very much. Doesn't that depend on whatever Python is built-in on the end-user's machine? I'd have to do some testing (which I may not have properly equipped machines to do) to see what my app will work with . . .

Best,
Charles Hartman


On Jan 19, 2008, at 4:20 PM, Kenneth Miller wrote:

Check out py2applet, I use it all the time.

Regards,
Kenneth Miller

On Jan 19, 2008 1:40 PM, Charles Hartman < [EMAIL PROTECTED] > wrote: I mean *really* simple: I've been away from Python programming for a couple of years, and I've just gotten a query about an old open- source
program posted on my website. I may have a fix for the problem the
user encountered, at least when I run from inside the Wing IDE.

My question is, what is the current best/simplest way to build a
freestanding application? I tried "python setup.py" with my old
setup.py file, but I get an error: setuptools not found. Maybe I just
need to fix my path? It's been a couple of systems (a couple of
computers, for that matter) since I did this, and though I've kept up
with current versions of Python (2.5), Wing, and wxPython (2.8.x),
I've probably neglected some basic housekeeping.

Pointers to a simple how-to-build-an-app doc would be welcome. Thanks
for any help.

Charles Hartman

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig




_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to