Re: [Pythonmac-SIG] Gtk issues

2009-06-07 Thread Chris Van Bael
Hi,

In the post you mentioned below, there is step 3:

3 install pygtk 2.10.14 (working well with the framework)
PKG_CONFIG_PATH=/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig:
path_to_your_folder/pkgconfig ./configure
--prefix=/Library/Frameworks/Python.framework/Versions/2.5


Up til now I followed the instructions from
http://live.gnome.org/GTK%2B/OSX/BuildInstructions
and they work fine if I add as last command jhbuild build pygtk ...
for the System Python, but I need it in the Python.org Python (see my
mails on the PyGTK mailinglist)
So all GTK things are installed correct, only PyGTK is not linked to
the correct Python.

In your instruction however, I see
prefix=/Library/Frameworks/Python.framework/Versions/2.5
I think that may be what I need to link it to the correct Python.

But can you explain exactly what you type in Terminal?
I'm quite a noob on this, so if you could explain in very simple terms?

Thanks,

Chris

On Mon, Jun 1, 2009 at 8:35 AM, genemartin wrote:
>
> see my post on installing gtk and pygtk without Macports or Fink.
> http://www.nabble.com/PyGTK-on-OSX--to21186327.html#a22451916
> http://www.nabble.com/PyGTK-on-OSX--to21186327.html#a22451916";>PyGTK on OSX?
>
> I don't use Fink or MacPorts because I want to compile myself to learn  and
> they interfere :  if you try to use libraries from either, you may have
> problems with version mismatches and library duplication between them and
> /usr/local or python framework stuff
>
> In site-package, i have :
> - a folder named gtk-2.0 with folders named gtk, gio,glib, gobject and some
> files pango etc...
> - a folder named cairo
> - a file named pygtk.py
> - a file named pygtk.pth referring to "gtk-2.0"
>
> _gtk.so is in site-packages/gtk-2.0/gtk/_gtk.so
>
> in /Library/Frameworks/Python.framework/Versions/2.5/lib/
> I have a folder named pkgconfig with the files pycairo.pc,pygtk-2.0.pc,
> pygobject-2.0.pc
> The file named pygtk-2.0.pc is
> "prefix=/Library/Frameworks/Python.framework/Versions/2.5
> exec_prefix=${prefix}
> includedir=${prefix}/include
> datarootd...@datarootdir@
> datadir=${prefix}/share
> pyexecdir=${exec_prefix}/lib/python2.5/site-packages
>
> # you can use the --variable=pygtkincludedir argument to
> # pkg-config to get this value.  You might want to use this to
> # install additional headers.
> pygtkincludedir=${includedir}/pygtk-2.0
>
> # same here.  Useful when calling the code generator in addon packages.
> defsdir=${datadir}/pygtk/2.0/defs
> codegendir=${datadir}/pygtk/2.0/codegen
>
> Name: PyGTK
> Description: Python bindings for GTK+ and related libraries
> Requires: pygobject-2.0
> Version: 2.10.4
> Cflags: -I${pygtkincludedir} "
>
> I hope this will help
> --
> View this message in context: 
> http://www.nabble.com/Gtk-issues-tp23803508p23810538.html
> Sent from the Python - pythonmac-sig mailing list archive at Nabble.com.
>
> ___
> Pythonmac-SIG maillist  -  pythonmac-...@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


Re: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard

2009-05-17 Thread Chris Van Bael
On Sat, May 16, 2009 at 6:04 PM, Ned Deily  wrote:
> Well, no, that's not right.  But just to make sure we're talking apples
> to Apples, make sure you are really invoking the pythons you think you
> are.  Just cd'ing to a directory doesn't automatically add that
> directory to $PATH.  So, if you just type "python", you're likely
> getting the same python each time.  Instead, do the cd to the two "bin"
> directories but type "./python" instead.

Ned, you're absolutely right!
cd //Library/Frameworks/Python.framework/Versions/Current/bin/
./Python gives:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> import pygtk
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named pygtk

cd //System/Library/Frameworks/Python.framework/Versions/Current/bin/
./python gives
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named pygame
>>> import pygtk

So the user python is indeed working and has PyGame installed.
But unfortunately PyGTK is installed in the system Python, but I want
it in my user python.

I forgot to mention that I also did "jhbuild build pygtk" after that tutorial.
So it installs PyGTK, only in the wrong Python.
How can I solve that?

Do I need to change a configuration file that jhbuild uses as input or
can I copy the build GTK+PyGTK to my user Python?

Thanks for the help!

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


Re: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard

2009-05-15 Thread Chris Van Bael
Hi all,

it's been a while since my last question, but unfortunately I didn't
make much progress.
The problem I'm facing now is that PyGTK is not installed correct.

I installed python 2.5 from Python.org.
So if I do cd //Library/Frameworks/Python.framework/Versions/Current/bin/
and python, I get the following Python prompt:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

But if I go to the System Python cd
//System/Library/Frameworks/Python.framework/Versions/Current/bin/
I get exactly the same Python prompt.
Is that correct?

Then I went to the PyGame website and installed
pygame-1.8.1release-py2.5-macosx10.5.zip
They say it is for the Python.org python.
If I do "import PyGame" it works on both the Python.org and System Python.
I was confused that it would also work on the System Python.

Then I wanted to install PyGTK, for which I followed the instructions
on http://live.gnome.org/GTK%2B/OSX/BuildInstructions

When finally finished, I tried to "import pygtk", but
>>> import pygtk
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named pygtk

This on both the System Python as the Python.org python.

So now I'm completely stuck!
To me, it looks like Python.org and System Python are the same
And PyGTK is not installed.
I must say I tried the same commands to install PyGTK before and then
it worked in the System Python.  But I have no idea what was different
now.

Any help would be greatly appreciated!

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


Re: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard

2009-03-22 Thread Chris Van Bael
Hi,

thanks for the comprehensive explanation!
It clarifies things a lot.

Chris

On Sun, Mar 22, 2009 at 8:23 PM, Ned Deily  wrote:
> In article
> <5465ee790903220622m7897dfcch7e8d838e6b429...@mail.gmail.com>,
>  Chris Van Bael  wrote:
>> some simple questions:
>> - if I installed another Python, how can I start it?  Whenever I open
>> a terminal and type "python", I get Python 2.5.1, which I assume is
>> the Python from Apple.
>> - On Windows there is the directory /Lib/site-packages, I can't find
>> this one on my Mac.
>
> For python.org installers, each python major version lives in its own
> framework sub-tree rooted at:
>
> /Library/Frameworks/Python.framework/Versions/m.n/
>
> where m.n is 2.5, 2.6, 3.0, etc.
>
> At the top level of each version's subtree, there are bin, lib, include
> and other directories.   You'll find a pythonm.n executable and a python
> symlink to it in the bin directory.
>
> Site packages for each version reside within its subtree lib directory
> but normally you don't need to manipulate those directly.  By default,
> distutils (and its users, easy_install, pip, virtualenv et al) will
> install extensions to the right site-library by running under the
> setup.py script or easy_install or pip under the appropriate version of
> the python executable.  Extension scripts will also be installed in the
> corresponding bin directory.
>
> So to select which python you want to start, you can invoke it directly
> with:
>
> /Library/Frameworks/Python.framework/Versions/2.5/bin/python
>
> or modify your shell path to ensure that bin directory comes before
> /usr/bin where the Apple-supplied python resides.  Or create a shell
> alias to it.  Or use /usr/local/bin/pythonm.n because the python.org 2.x
> installers create a link there by default - but beware because (1) that
> doesn't help for installed scripts, (2) can be confusing with multiple
> versions, and (3) by default the 3.x installers do not create that link.
>
> For development environments with multiple versions, a good solution
> these days is to use virtualenv.  Jesse Noller has a very good overview
> of how to do that here:
>
> <http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/>
>
> Again, all of the above applies to python.org installers.  For the
> record, the Apple-supplied python uses a more elaborate framework
> scheme, split between /System/Library/Frameworks and /Library/Python,
> with different defaults.  macports uses a framework scheme rooted at
> /opt/local/Library/Frameworks. And fink python installs are more
> debian-y style non-framework layouts in /sw/{bin,lib,...}.
>
> --
>  Ned Deily,
>  ...@acm.org
>
> ___
> Pythonmac-SIG maillist  -  pythonmac-...@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


Re: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard

2009-03-22 Thread Chris Van Bael
Hi,

some simple questions:
- if I installed another Python, how can I start it?  Whenever I open
a terminal and type "python", I get Python 2.5.1, which I assume is
the Python from Apple.
- On Windows there is the directory /Lib/site-packages, I can't find
this one on my Mac.

Spotlight isn't much help there either, do I have to change anything
in it so that it will find those directories?

Thanks,

Chris

On Tue, Mar 17, 2009 at 5:21 PM, Christopher Barker
 wrote:
> Chris Van Bael wrote:
>>
>> So if it says blabla_python2.5_osx10.5.
>> and I have installed Python 2.5 next to the systems' 2.5, it will
>> install it in Python 2.5 from Python.org?
>
> Probably, but the only way top know is to read the docs that came with it
> (or try it and see what happens).
>
> If it says os-X10.5 there is a good chance it's for the system python, as
> the python-org one is not 10.5 dependent. However, you can build a 10.5-only
> extension for the python.org python, so really, the only way to know is to
> see what the person that built it says it is for.
>
> -Chris
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (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


Re: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard

2009-03-17 Thread Chris Van Bael
On Mon, Mar 16, 2009 at 8:41 PM, Christopher Barker
 wrote:
>
> (make sure to reply to the list, for the archives...)
>
> Chris Van Bael wrote:
>>
>> Yes, I absolutely do want to buil binaries that can run on 10.3.9 and
>> 10.4!
>> This is very important.
>
> Then you want the python.org python.

OK, I'll keep that in mind.

>> Do you have the paths for the system python and the installation from
>> python.org?
>
> system python is in:
> /Library/Frameworks/Python.framework/
>
> python.org goes into:
>
> /Library/Frameworks/Python.framework/

Those seem to be the same, is that intentional?

>
>
>> My problem with Mac installers is that they just ask a partition in
>> which to install the software.
>> But I want to be sure that they install the packages into the correct
>> python installation. (the one from python.org)
>
> If you are using an installer, then it has to be built for the python you
> want. Most only target one -- wxPython targets both python.org and Apple's
> (for Python 2.5)

So if it says blabla_python2.5_osx10.5.
and I have installed Python 2.5 next to the systems' 2.5, it will
install it in Python 2.5 from Python.org?

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


[Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard

2009-03-13 Thread Chris Van Bael
Hi,

I want to port an application that runs on Linux and Windows perfectly to OSX.
We use Python 2.5, PyGame, PyGTK and SQLAlchemy for it.
Now I have a system with Leopard on it, but want to make sure what
would be the best solution to get these dependencies installed on it.
I remember reading on this mailinglist that there were some problems
with the python included in Leopard.
I was able to compile PyGTK with the included python, now I tried to
install PyGame 1.8.1 on it but all partitions are red.

Do I need to install another Python alongside the included python (or
should I replace it)?

Thanks for the help.
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app under Windows

2009-01-16 Thread Chris Van Bael
On Fri, Jan 16, 2009 at 1:57 PM, Ranec  wrote:
> Hi there,
>
> dumb question, probably, but:
>
> can I build a MacOS App, using py2app, under Windows?
No

> If not, is there any way I can build a MacOS Python Application using a
> Windows PC?
Not legally, but there are VMWare images to run OSX in VMWare on
Windows or you can make a 'hackintosh'.
For both solutions do a google search.

> If there's no way, how do I find a Mac / Python developer to help me
> distribute my application for the Mac?
You could ask here for instance.
Is your application open source or a commercial app?

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


Re: [Pythonmac-SIG] py2app + pygame: how to exclude pygame icon?

2009-01-01 Thread Chris Van Bael
On Thu, Jan 1, 2009 at 7:47 PM, Joel Gluck  wrote:
> Hi all,
> Am using py2app and hitting this problem: py2app's built-in recipe for
> pygame is causing the pygame icon to appear when I run the app from the
> dock.

Could you not just replace the pygame icon with your icon?
So still have a file named pygame_icon.icns, but the contents would be
your icon?
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] PyGTK on OSX?

2008-12-27 Thread Chris Van Bael
Hi all,

I'm trying to get our program to run on OSX (see www.schoolsplay.org)

We use GTK and Pango for RTL support and better font rendering.
I installed the framework from http://www.gtk-osx.org/, but PyGTK
doesn't seem to be installed.
Does anybody have an idea where I can get a binary build of PyGTK?
Or where I can find building instructions that don't need DarwinPorts?

Any particular things I have to keep in mind while making an
Application Bundle with GTK on OSX?

Thanks,

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


Re: [Pythonmac-SIG] Get the locale on OSX

2007-12-05 Thread Chris Van Bael
On Dec 3, 2007 9:26 AM, Chris Van Bael <[EMAIL PROTECTED]> wrote:
> On Dec 3, 2007 8:40 AM, Nicholas Riley <[EMAIL PROTECTED]> wrote:
> > On Sun, Dec 02, 2007 at 03:18:14PM +0100, Chris Van Bael wrote:
> > > I'm trying to port an python application which runs fine on Windows
> > > and Linux to OSX.
> > > However, it seems "lang = locale.getdefaultlocale()[0]" doesn't work.
> > > I've searched quite some bit on the Internet and on this mailinglist,
> > > and apparently it is a problem, but I haven't found any solution for
> > > it.
> >
> > What are you trying to do with the locale information?  Leopard's
> > Terminal does have an option to 'set LANG environment variable on
> > startup', which when checked does cause locale.getdefaultlocale() to
> > work, but this is of no help in general.
>
> Well,
>
> it's for some educational games: Childsplay and Schoolsplay
> (www.schoolsplay.org)
> Based on the locale information, we choose different languages to use
> in the strings and also different alphabet sound files.
> We do have an commandline option to set the language, so "schoolsplay
> --language=nl_BE" would give Dutch strings and sounds.
> However the nicest option would be that it searched in the settings of the OS.
> The program would be packed btw with py2app, so and end user wouldn't
> have to use the Terminal (and install all Python dependencies).

Anybody any ideas on how to solve my problem?
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Get the locale on OSX

2007-12-03 Thread Chris Van Bael
On Dec 3, 2007 8:40 AM, Nicholas Riley <[EMAIL PROTECTED]> wrote:
> On Sun, Dec 02, 2007 at 03:18:14PM +0100, Chris Van Bael wrote:
> > I'm trying to port an python application which runs fine on Windows
> > and Linux to OSX.
> > However, it seems "lang = locale.getdefaultlocale()[0]" doesn't work.
> > I've searched quite some bit on the Internet and on this mailinglist,
> > and apparently it is a problem, but I haven't found any solution for
> > it.
>
> What are you trying to do with the locale information?  Leopard's
> Terminal does have an option to 'set LANG environment variable on
> startup', which when checked does cause locale.getdefaultlocale() to
> work, but this is of no help in general.

Well,

it's for some educational games: Childsplay and Schoolsplay
(www.schoolsplay.org)
Based on the locale information, we choose different languages to use
in the strings and also different alphabet sound files.
We do have an commandline option to set the language, so "schoolsplay
--language=nl_BE" would give Dutch strings and sounds.
However the nicest option would be that it searched in the settings of the OS.
The program would be packed btw with py2app, so and end user wouldn't
have to use the Terminal (and install all Python dependencies).
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Get the locale on OSX

2007-12-02 Thread Chris Van Bael
Hi,

I'm trying to port an python application which runs fine on Windows
and Linux to OSX.
However, it seems "lang = locale.getdefaultlocale()[0]" doesn't work.
I've searched quite some bit on the Internet and on this mailinglist,
and apparently it is a problem, but I haven't found any solution for
it.
Does anybody here have one?

Thanks,

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


Re: [Pythonmac-SIG] How to make 2 scripts in one application

2007-03-05 Thread Chris Van Bael
On 3/5/07, Dethe Elza <[EMAIL PROTECTED]> wrote:
> On 5-Mar-07, at 4:45 AM, Chris Van Bael wrote:
>
> > Hi all,
> >
> > doesn't anybody have an idea on how to solve this issue?
>
> Sorry, didn't see your original post.
>
> You can address the python instance in the application bundle (which
> will use the modules in the application bundle), but I think you'll
> need to know the path the the application.  If the application will
> always be in /Applications/ then you're good to go, otherwise you'll
> need to have another way to find the Application location (there are
> several, how you do this depends on several things I don't know about
> your deployment environment).
>
> For instance, I have an application named "Drawing Board" in my /
> Applications directory, that was build using py2app.  I can invoke
> the python embedded in it with the path:
>
> /Applications/Drawing\ Board.app/Contents/MacOS/python
>
> So if my script starts with
>
> #!/Applications/Drawing\ Board.app/Contents/MacOS/python
>
> then it will run using that version of Python by default and have
> access to any libraries I've included with my application.
>
> Does that answer your question?

Definitely!
Thanks.

Problem is indeed the location of the application.
I'll try some things out.

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


Re: [Pythonmac-SIG] How to make 2 scripts in one application

2007-03-05 Thread Chris Van Bael
Hi all,

doesn't anybody have an idea on how to solve this issue?

Thanks,

Chris

On 2/27/07, Chris Van Bael <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Maybe a totally noob question, but I'll ask it anyway since I couldn't
> find an answer on the series of tubes...
> I'm working on a pygame program that runs on Linux, Windows and Mac.
> It uses an database which it accesses through SQLAlchemy.
> So on Linux in setup.py we have a section to install the program and
> create that database.
> Now on Windows with py2exe I have a setup.py which has a console and a
> windows script.
> The windows script runs the program and the console script sets up the 
> database.
> Since I use no library.zip file, this can also access the SQLAlchemy modules.
>
> Now I want to do something similar to that for OSX.
> I cannot run the script with the python installed on OSX because it
> needs SQLAlchemy.
> But the modules I need are somewhere in the application bundle, can I
> use them somehow?
>
> Greets,
>
> Chris
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] How to make 2 scripts in one application

2007-02-27 Thread Chris Van Bael
Hi all,

Maybe a totally noob question, but I'll ask it anyway since I couldn't
find an answer on the series of tubes...
I'm working on a pygame program that runs on Linux, Windows and Mac.
It uses an database which it accesses through SQLAlchemy.
So on Linux in setup.py we have a section to install the program and
create that database.
Now on Windows with py2exe I have a setup.py which has a console and a
windows script.
The windows script runs the program and the console script sets up the database.
Since I use no library.zip file, this can also access the SQLAlchemy modules.

Now I want to do something similar to that for OSX.
I cannot run the script with the python installed on OSX because it
needs SQLAlchemy.
But the modules I need are somewhere in the application bundle, can I
use them somehow?

Greets,

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


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-14 Thread Chris Van Bael
> > What are the versions of py2app, macholib, altgraph, modulegraph on your
> > machine? Likewise for python itself.
> >
> > Just in case this is important: what version of OSX are you using, is it
> > an Intel or PPC system and do you have the Developer Tools installed?
>
> from my first mail:
> > I am working on an old G3 ppc ibook, I am running OS 10.4.8 and python 
> > 2.4.4, Py2app version is 0.3.5 .
>
> and on top of that :
> i have Xcode tools for 10.4, macholib-1.1-py2.4, altgraph-0.6.7-py2.4,
> modulegraph-0.7-py2.4
>

Hi, I thought I had replied to the whole list, but apparently only to Enrike.

I have exactly the same software versions on my iBook G4.
I had the same Py2App on my Mini G4 where it worked after several
reinstallations.  Don't know about which versions of MachoLib,
AltGraph or ModuleGraph I had.
I'll archive my Python dir in case that's useful for you...

Ronald,
do you need anything else from us to be able to solve this problem?
Thanks again for the effort,

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


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread Chris Van Bael
Hi,

I'm getting essentially the same error for some time now.
Could anybody please explain what is going wrong here exactly, because
me and some other people are having the same error and re-installing
py2app doesn't fix the problem.

See:
http://mail.python.org/pipermail/pythonmac-sig/2007-January/018645.html
http://mail.python.org/pipermail/pythonmac-sig/2006-October/018390.html
http://mail.python.org/pipermail/pythonmac-sig/2006-October/018391.html

It would be a shame that I cannot provide a universal OS X version of
our program because of this problem..

Chris

On 2/5/07, Bob Ippolito <[EMAIL PROTECTED]> wrote:
> When you see an error like that, it means there's a bug in macholib
> that caused it to produce a bogus file. Turning strip off doesn't
> really fix anything...
>
> -bob
>
> On 2/5/07, altern <[EMAIL PROTECTED]> wrote:
> > hi again
> >
> > I solved the problem by doing
> > $ python setup.py py2app --no-strip
> >
> > I read this about strip
> > --strip (-S)strip debug and local symbols from output (on by
> >  default, for compatibility)
> >
> > could anyone explain a bit more about what this is? or maybe point to
> > somewhere i can read about it. I am interested because last time i used
> > this machine i did not need to use this (only use it every now and then
> > for testing on OSX), so I am trying to find out what is the difference
> > from last time.
> >
> > thanks
> >
> > enrike
> >
> >
> > altern wrote:
> > > Hi
> > >
> > > I am getting this error when trying to use py2app.
> > >
> > > $ py2applet --make-setup glut_opengl.py
> > > $ python setup.py py2app
> > > ...
> > > ...
> > > stripping bz2.so
> > > stripping zlib.so
> > > stripping _codecs_tw.so
> > > stripping umath.so
> > > stripping binascii.so
> > > /usr/bin/strip: for architecture i386 object:
> > > /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
> > > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
> > > command 13 can't byte swap it)
> > > /usr/bin/strip: for architecture i386 object:
> > > /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl
> > > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
> > > command 10 can't byte swap it)
> > > stripping saved 8991796 bytes (7898608 / 16890404)
> > >
> > >
> > > I also tried with
> > > $ python setup.py py2app --prefer-ppc
> > > but i got the same error. Because of the '/usr/bin/strip: for
> > > architecture i386 object' I thought it might be a problem with my
> > > processor, note that I am working on an old G3 ppc ibook, I am running
> > > OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .
> > >
> > > Later I tried with another script, one that does not use pyOpengl, same
> > > error again.
> > >
> > > thanks
> > >
> > > enrike
> > >
> >
> > ___
> > 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
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Stripping for i386 on G4, bad install of py2app

2007-01-28 Thread Chris Van Bael
Hi all,

I want to ask you for some help, for a problem that's coming back to
bite me again.
See: http://mail.python.org/pipermail/pythonmac-sig/2006-November/018421.html

Problem is that striping for i386 doesn't succeed on a G4.  Did the
uninstall according to the py2app webpage, but still fails.  I had
this problem on my G4 Mini and I could only resolve it by reinstalling
OS X completely.  Now I have an iBook G4 with the same problem.
Reinstalled OSX completely, but still no success.

If first installed setuptools and py2app with the bootstrap method,
when a build with that failed, I uninstalled it and re-installed it
according to this guide:
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#installation

I know of some other people that where also not succesfull in
installing py2app/setuptools.
Is there maybe some problem with the installer?
I do it every time according to the guide and yet most of the time it fails...

Greets,

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


Re: [Pythonmac-SIG] Getting an ugly icon?

2006-11-27 Thread Chris Van Bael
Hi Ronald,

I tried your suggestions, but now I'm officially completely lost:
In Finder I first saw a generic icon. (just after building)
I started my application: at first the pygame icon, afterwards my ugly icon.
Closed my app and did "touch myapp.app"
Now I got a "16ton" icon in Finder and still my ugly icon when running?!

It seems my icon is not included in the Resources folder in myapp.app,
but PythonApplet.icns is.
But how and why is it still showing my ugly icon when running?
Can anybody please shed some light on this one, because I'm totally lost...

Chris

On 11/8/06, Ronald Oussoren <[EMAIL PROTECTED]> wrote:
>
> On Wednesday, November 08, 2006, at 09:09AM, "Chris Van Bael" <[EMAIL 
> PROTECTED]> wrote:
> >Hi,
> >
> >Whatever I try, I always get a very ugly icon in my Python program.
> >
> >What I do:
> >Open Icon Composer, click on the 128x128 field and open an 180x180 icon.
> >Let it rescale it and save it as an icns file.
> >In Preview this icns file looks great.
> >When I make an app with py2app it's included "--iconfile childsplay.py"
> >However when I startup my program, it has a very ugly icon file.
> >In the .app I see that the icns file is included.
> >
> >I once made the app with an ugly windows icon file, but I remove
> >everything before I run py2app, so that would seem strange.
> >And _some_ file is included, but it is really my icon, but very fugly!
>
> I have fixed an icon-related issue a while back and don't know if there has 
> been a release since then. Could you try the development version of py2app 
> (easy_install py2app==dev)?
>
> Ronald
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Getting an ugly icon?

2006-11-08 Thread Chris Van Bael
Thanks!
I'll try that, I'm on 3.5 btw.

On 11/8/06, Ronald Oussoren <[EMAIL PROTECTED]> wrote:
>
> On Wednesday, November 08, 2006, at 09:09AM, "Chris Van Bael" <[EMAIL 
> PROTECTED]> wrote:
> >Hi,
> >
> >Whatever I try, I always get a very ugly icon in my Python program.
> >
> >What I do:
> >Open Icon Composer, click on the 128x128 field and open an 180x180 icon.
> >Let it rescale it and save it as an icns file.
> >In Preview this icns file looks great.
> >When I make an app with py2app it's included "--iconfile childsplay.py"
> >However when I startup my program, it has a very ugly icon file.
> >In the .app I see that the icns file is included.
> >
> >I once made the app with an ugly windows icon file, but I remove
> >everything before I run py2app, so that would seem strange.
> >And _some_ file is included, but it is really my icon, but very fugly!
>
> I have fixed an icon-related issue a while back and don't know if there has 
> been a release since then. Could you try the development version of py2app 
> (easy_install py2app==dev)?
>
> Ronald
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Getting an ugly icon?

2006-11-08 Thread Chris Van Bael
Hi,

Whatever I try, I always get a very ugly icon in my Python program.

What I do:
Open Icon Composer, click on the 128x128 field and open an 180x180 icon.
Let it rescale it and save it as an icns file.
In Preview this icns file looks great.
When I make an app with py2app it's included "--iconfile childsplay.py"
However when I startup my program, it has a very ugly icon file.
In the .app I see that the icns file is included.

I once made the app with an ugly windows icon file, but I remove
everything before I run py2app, so that would seem strange.
And _some_ file is included, but it is really my icon, but very fugly!

Thanks for any help.

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


Re: [Pythonmac-SIG] Problems with py2app for i386

2006-11-08 Thread Chris Van Bael
On 10/30/06, Bob Ippolito <[EMAIL PROTECTED]> wrote:
> On 10/29/06, Chris Van Bael <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm building an application on a PPC Mini in Python with PyGame.
> > When I run "python setup.py py2app" I get a .app file made that runs
> > on my (and other) PPC Macs.  But it fails on Intel Macs.
> > I presume these last lines I get have something to do with it:
> > "
> > /usr/bin/strip: for architecture i386 object:
> > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/childsplay
> > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
> > command 10 can't byte swap it)
> > /usr/bin/strip: for architecture i386 object:
> > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/python
> > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
> > command 13 can't byte swap it)
> > stripping saved 11991384 bytes (12298552 / 24289936)
> > "
> >
> > Any ideas where my problem is; is it in my code or a problem of py2app
> > or the strip application?
> > Do I need to use the no-strip option or prefer-ppc for a universal binary?
>
> It looks like you probably didn't install py2app properly. Perform a
> full uninstallation and follow the installation instructions in the
> documentation.
>
> http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#installation
>

Hi all,

I uninstalled py2app as described on that webpage.
Went through my HD with Finder and Spotlight and removed everything
that mentioned py2app.

Reinstalled py2app via easy_install.

End result: same problem!

Also tried the --no-strip and --prefer-ppc options, but they didn't help.
Any ideas?
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Problems with py2app for i386

2006-10-30 Thread Chris Van Bael
Strange because I followed that manual exactly.
But I'll try again...

Thanks for the help

On 10/30/06, Bob Ippolito <[EMAIL PROTECTED]> wrote:
> On 10/29/06, Chris Van Bael <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm building an application on a PPC Mini in Python with PyGame.
> > When I run "python setup.py py2app" I get a .app file made that runs
> > on my (and other) PPC Macs.  But it fails on Intel Macs.
> > I presume these last lines I get have something to do with it:
> > "
> > /usr/bin/strip: for architecture i386 object:
> > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/childsplay
> > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
> > command 10 can't byte swap it)
> > /usr/bin/strip: for architecture i386 object:
> > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/python
> > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
> > command 13 can't byte swap it)
> > stripping saved 11991384 bytes (12298552 / 24289936)
> > "
> >
> > Any ideas where my problem is; is it in my code or a problem of py2app
> > or the strip application?
> > Do I need to use the no-strip option or prefer-ppc for a universal binary?
>
> It looks like you probably didn't install py2app properly. Perform a
> full uninstallation and follow the installation instructions in the
> documentation.
>
> http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#installation
>
> -bob
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Problems with py2app for i386

2006-10-29 Thread Chris Van Bael
Hi,

I'm building an application on a PPC Mini in Python with PyGame.
When I run "python setup.py py2app" I get a .app file made that runs
on my (and other) PPC Macs.  But it fails on Intel Macs.
I presume these last lines I get have something to do with it:
"
/usr/bin/strip: for architecture i386 object:
/Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/childsplay
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
command 10 can't byte swap it)
/usr/bin/strip: for architecture i386 object:
/Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/python
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
command 13 can't byte swap it)
stripping saved 11991384 bytes (12298552 / 24289936)
"

Any ideas where my problem is; is it in my code or a problem of py2app
or the strip application?
Do I need to use the no-strip option or prefer-ppc for a universal binary?

Thanks for any help.

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


[Pythonmac-SIG] Problems on using py2app: how to add extra files?

2006-10-20 Thread Chris Van Bael
Hi all,

I'm the window maintainer of Childsplay(childsplay.sourceforge.net),
and wanted to port it also to Mac.  But I got a problem with py2app.

So my source directory looks a bit like this: (simplified)
ConfParser.py
childsplay.py
setup.py

In a terminal "python childsplay.py" runs just fine. (childsplay is
btw a pygame app)
The setup.py is the following:
APP = ['childsplay.py']
DATA_FILES = ['Confparser.py']
OPTIONS = {'argv_emulation':True}

setup(
   app=APP,
   data_files=DATA_FILES,
   option={'py2app':OPTIONS},
   setup_requires=['py2app'],
)

So standard generated setup.py, only ConfParser.py is added.

Now when I make the app in alias mode, it works fine.
However when I make it in normal mode, it complains that it cannot
import the ConfParser.py file from childsplay.app/Contents/Resources.
But when I go see into the app file/directory, it is there ?!

Probably something very simple I'm doing wrong, but I really have no idea...

Thanks for the help,

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