Re: [pygame-sf] Lepton 0.5a released

6 views
Skip to first unread message

Casey Duncan

unread,
Aug 18, 2008, 2:12:58 PM8/18/08
to Shandy Brown, py-lept...@googlegroups.com
On Aug 18, 2008, at 11:40 AM, Shandy Brown wrote:

> Hi Casey.
>
> Is there some way to detect if a user has the python development
> package
> installed for their platform? On my first try I got "Python.h: No
> such
> file or directory":

Packaging is done very differently on different distros, so no general
solution exists. the solution is typically to create a distro-specific
package and express the dependencies there. I imagine if Lepton gets
popular enough someone will do that for various distros.

> $ sudo python setup.py install
> running install
> running build
> running build_py
> running build_ext
> building 'lepton.group' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -I/usr/include -I/usr/local/include/
> -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.5 -c
> lepton/group.c -o build/temp.linux-x86_64-2.5/lepton/group.o
> lepton/group.c:18:20: error: Python.h: No such file or directory
> In file included from lepton/group.h:6,
> from lepton/group.c:20:
>
> So I did a `apt-get install python-dev-all`

Yeah, looks like they didn't include the headers in the default python
package. Apt packages are notorious for dividing things up like this.
Somebody somewhere believes this is superior to just packaging the
whole source together, seems like a lot of extra complexity to me.

> 2nd attempt "cannot find -lXext":
>
> $ sudo python setup.py install
> running install
> running build
> running build_py
> running build_ext
> building 'lepton.group' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -I/usr/include -I/usr/local/include/
> -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.5 -c
> lepton/group.c -o build/temp.linux-x86_64-2.5/lepton/group.o
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -I/usr/include -I/usr/local/include/
> -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.5 -c
> lepton/vector.c -o build/temp.linux-x86_64-2.5/lepton/vector.o
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -I/usr/include -I/usr/local/include/
> -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.5 -c
> lepton/groupmodule.c -o build/temp.linux-x86_64-2.5/lepton/
> groupmodule.o
> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
> build/temp.linux-x86_64-2.5/lepton/group.o
> build/temp.linux-x86_64-2.5/lepton/vector.o
> build/temp.linux-x86_64-2.5/lepton/groupmodule.o -L/usr/local/lib
> -L/usr/X11/lib -L/usr/X11R6/lib -lGL -lX11 -lXext -o
> build/lib.linux-x86_64-2.5/lepton/group.so
> /usr/bin/ld: cannot find -lXext
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
> So I did `apt-get install libxext-dev`.

Ok, that's some X windows extensions that are required for compiling
in OpenGL support. If Lepton were packaged for apt, this could be
dealt with automagically.

> That got it to install.

Cool.

> Testing:
>
> ____[sjbrown@sbrown-dev2] [~/Desktop/lepton-0.6a/test]____
> $ nosetests
> .................F...........................
> ======================================================================
> FAIL: test_StaticEmitter_deviation (emitter_test.EmitterTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/sjbrown/Desktop/lepton-0.6a/test/emitter_test.py", line
> 122, in test_StaticEmitter_deviation
> self.assertVector(velocity_mean, template.velocity, tolerance=0.2)
> File "/home/sjbrown/Desktop/lepton-0.6a/test/emitter_test.py", line
> 26, in assertVector
> self.failUnless(abs(vy - y) <= tolerance, ((vx,vy,vz), (x,y,z)))
> AssertionError: ((0.048072595700603502, 0.42218148937202166,
> 0.022459009756873909), (0.0, 0.0, 0.0))
>
> ----------------------------------------------------------------------
> Ran 45 tests in 0.919s
>
> FAILED (failures=1)

That's an interesting failure. Does it fail consistently if you run
the tests repeatedly? This is testing randomness, so it's a bit hard
to make this pass completely reliably, though I've not seen it fail in
this way.

I'll try running this test repeatedly to see if I can reproduce it.

> Examples:
>
> billboard_fire.py: just a black screen for me.
> bouncy.py: works
> flyby.py: streaky lines
> point_fire.py: very very dim.
> pygame_bubble.py: seems to work
> smoke.py: streaky lines briefly appear.
>
>
> My System:
>
> ____[sjbrown@sbrown-dev2] [~]____
> $ uname -a
> Linux sbrown-dev2 2.6.24-19-generic #1 SMP Fri Jul 11 21:01:46 UTC
> 2008
> x86_64 GNU/Linux
>
> ____[sjbrown@sbrown-dev2] [~]____
> $ cat /proc/driver/nvidia/version
> NVRM version: NVIDIA UNIX x86_64 Kernel Module 169.12 Thu Feb 14
> 17:51:09 PST 2008
> GCC version: gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

Just out of curiosity is this the latest driver version? Do other
games/programs with 3D graphics work properly on this machine?

I'd be interested to see the OpenGL version supported. With pyglet
installed, you can get a dump of the capabilities of OpenGL on your
machine using:

python -m pyglet.info

It looks like none of the textured examples are working. None of them
require a very recent OpenGL version, so I'm at bit of a loss to
explain why they aren't working right. Perhaps the output of the above
will lend some clues.

Thanks for taking the time to build and test this.

-Casey


Reply all
Reply to author
Forward
0 new messages