New issue 341 by kamaldeep.ts: PyMT 0.5.1 - cython generated files missing
windows header include
http://code.google.com/p/pymt/issues/detail?id=341
What steps will reproduce the problem?
1. Grab PyMT 0.5.1 and recommended dependencies onto XP SP3 with Python
2.6.6
2. Install dependencies, Visual C++ 2008 and then run setup.py install PyMT
What is the expected output? What do you see instead?
Observe error originating from c extensions generated by cython: "error
C2054: expected '(' to follow 'WINGDIAPI' "
What version of the product are you using? On what operating system?
Please provide any additional information below.
This happens because the generated files c_graphics.c and c_graphx.c must
include <windows.h> before including <GL/gl.h>. I confirmed this and by
manualy adding this include statement, PyMT proceeded with installation on
XP 32-bit with SP3.
Comment #1 on issue 341 by txprog: PyMT 0.5.1 - cython generated files
missing windows header include
http://code.google.com/p/pymt/issues/detail?id=341
Mmmh, PyMT cannot be compiled with VSC2008, try:
python setup.py build_ext --inplace --compiler=mingw32
or
pymt.bat setup.py build_ext --inplace --compiler=mingw32
Mingw32 is already included in the package
C:\Documents and
Settings\Administrator\Downloads\PyMTSource\PyMT-0.5.1>python s
etup.py build_ext --inplace --compiler=mingw32
[INFO ] PyMT v0.5.1
running build_ext
building 'pymt.c_ext._transformations' extension
creating build\temp.win32-2.6
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\pymt
creating build\temp.win32-2.6\Release\pymt\c_ext
gcc -mno-cygwin -mdll -O -Wall
-Ic:\Python26\Lib\site-packages\numpy\core\includ
e -Ic:\Python26\include -Ic:\Python26\PC -c pymt/c_ext/transformations.c -o
buil
d\temp.win32-2.6\Release\pymt\c_ext\transformations.o
error: command 'gcc' failed: No such file or directory
Am i missing something?
If your using your python, you should also setup the env as expected.
You can check how it's done in pymt.bat, and adapt for you.
Our windows package is made for "portable" installation, and don't require
external python/mingw etc... all is already compiled and included.
If you want to do it yourself, you should correctly setup every elements
(gst, cython etc...) to make it work.
So if I wanted to write my own thing, how reliable is it to base it on the
python exe in the portable directory?
In the sense, all my modules need to be picked from this location and not
my system installed python lib location..right?
How do I ensure my PYTHONPATH does not clash etc? Since it was getting too
complicated, I decided to install from source.
Another issue I have seen is the Error 1280 'invalid enumerant' coming from
OpenGL call in texture.py. Is this related to the PyOpenGL version? These
two prompted me to try installing from source. Some tips to configure for
development would be helpful.
We definitivly need a page about configuring a system wide environment.
AT least for the compilation trouble, add MinGW\bin in your PATH + execute
with
python setup.py build_ext --inplace --compiler=mingw32
This shoudl resolve this issue.
For invalid enumerant... you should post another issue or show the
backtrace. But ensure you've opengl driver 2.0 minimum.
Thanks, will do that.
How do I ensure I have opengl 2.0 driver minumum? I've been reading that
windows has locked opengl versions to 1.1 since ages. My opengl32.dll has a
version 1.1.0, so when I run an example pymt app after install, it
says "using opengl 1.1.0 at startup.
Planning to open a new issue for the invalid enumerant problem, but want to
make sure I have the required driver installed first. I have an Nvidia
Quadro FX 3400 card in the system and an nvidia driver that supports OpenGL
3.1, although pymt/ui/window/__init__.py imports openGL which seems to pick
up the native openGL32.dll.
Yes, default windows drivers are opengl 1.1. If you install the driver from
nvidia, you'll have latest. Try to reinstall ?
Re-installing, restarting, then recompiling pymt and debugging the app
gives me the GLError, so I'll open an issue. Thanks