Craig posted this to the cs488 course's site regarding how to build
(with Togl) on RedHat Linux. There was one response saying the
instructions didn't work for one other person, but it apparently worked
on at least the one machine.
Enjoy yourselves,
Mike
-------- Original Message --------
Subject: PyOpenGL Linux goodness...
Date: Thu, 15 Jan 2004 14:54:45 -0500
From: Craig S. Kaplan <cs...@mu...>
Organization: University of Waterloo
Newsgroups: uw.cs.cs488
Hi everyone,
One of your brave fellow students provided her laptop in what
proved to be a successful PyOpenGL linux building experience.
Here are some simple instructions. They should work for, say,
RedHat 8/9 and Python 2.2 or 2.3. I'll assume you're using
Python2.2 for these instructions -- the substitutions for 2.3
should be obvious.
1. tar xzvf PyOpenGL-2.0.1.07.tar.gz
cd PyOpenGL-2.0.1.07
python setup.py install
At this point we'll get to that mysterious "can't find Tcl 8.1"
error that some of you have experienced. But a lot of the
files we need have already been installed.
4. Edit the file "setup/togl_setup.py". Look for the lines
# make package index for tcl/tk
if not dry_run:
Change "if not dry_run:" to "if 0:" to disable the block of
code that follows.
5. Edit the file
"/usr/lib/python2.2/site-packages/OpenGL/Tk/linux2-tk8.3/pkgIndex.tcl"
(the name may be slightly different for you). Add the following lines
to the end of it:
------------ CUT HERE --------------
if {![package vsatisfies [package provide Tcl] 8]} {return}
package ifneeded Togl 1.6.0 \
[list load [file join $dir Togl.so] Togl]
------------ CUT HERE --------------
6. Go back to the PyOpenGL-2.0.1.07 directory and re-run
"python setup.py install". This time the installation should
run until the end.
7. Don't try to test that it works from within the PyOpenGL
source directory -- it fails for some reason. Switch to
a different directory and try "from OpenGL.Tk import *"
from within a Python session. You shouldn't get any errors,
and a small window should appear on the screen.
Good luck to those of you who are still trying to make this
work. Let me know about continuing problems.
--
Craig S. Kaplan ``Evolution drives a steamroller,
School of Computer Science disguised as a stationary bike.''
University of Waterloo http://www.cgl.uwaterloo.ca/~csk/
|