From: "C. E. Ball" <[EMAIL PROTECTED]>
Date: 8 December 2007 00:40:11 GMT
To: pythonmac-sig@python.org
Subject: [Pythonmac-SIG] Building Python with X11 Tkinter




Chris
my first comment would be that there are plenty of issues here to grapple with

On OS X, I'd like to be able to build my own copy of Python that uses
my own copy of Tkinter (built for X11). I've seen several posts to
this list where people mention building python this way (e.g. [1] and
[2] below), but I'm pretty unfamiliar with the concepts, so I wonder
if someone could give me some more help, or point me to a place where
there are some instructions?


I found the only way I could get Python to build using my own tcl and
tk was by renaming OS X's Tk and Tcl framework directories so that
they would not be found.
It is not good to do this because anything else trying to use them will not find the originals.
Is there some alteration I can make to
python's setup.py instead?
You should be able to specify the non framework tcl and tk to the configure script which
you would run before setup.py do
configure --help used to show it to be something like configure- with-tcl=foo configure-with-tk=bar where foo and bar are the directories with the tcl and tk distributions in.
However this no longer holds ....
So whether this is correct  I'm unable to say at present.
This should not be AquaTk which has some deficiencies notably it doesn't include Togl or Tix this precludes the use of a library in the standard linux distribution (Tix) and prevents any access
to OpenGL through Tkinter.

You could also consider using a porting framework that way though either way you will end up having to wrangle
3 pythons.
the 2.3.x version one shipped with OSX
the 2.5.x Framework install that brought you here and
the X11 2.x.x that you build yourself or install from Mac/Darwinports or Fink

This means that you have to be quite careful about tracking where and how you install things into the site-packages
directory of each version.
You cannot really run framework builds alongside X11 builds of extension libraries for the same python.

If its not heresy on this list I'd suggest getting familiar with the Unix build process on Linux (in a VM sandbox if necessary) first before (potentially) creating mayhem on your Mac. It will reduce the number of variables and simplify the learning curve before having to deal with what are effectively two different environments that coexist under OS X.
That is OS X frameworks with  PyObjC and shared libraries with X11.

I'd like to have Python use X11 rather than Aqua so that I can run
automated (buildbot) tests of an application (that is based on Python)
on a virtual (Xvfb) display.

I haven't done an X11 build recently but I did do circa 10.1/10.2 and it worked fine and I may be doing it again myself over the next couple of weeks.

Ed Hartley
PS just seen your latest post IIRC and passing flags is the alternative to what I described above and should work unless something in the script is
detecting the platform and overriding the options you're passing.
Someone on this list would be able to answer that one I'm sure.

[1] http://article.gmane.org/gmane.comp.python.apple/12394/
[2] http://article.gmane.org/gmane.comp.python.apple/12897/


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

Reply via email to