What about Python 2.5
Moderator: Moderators
What about Python 2.5
Ok, I've upgraded my system with the brand new OpenSuSE, and now python 2.5 is the reference ...
I've tried to recompile my little spring, and it seems the dependancy with python is tied to version 2.4 (ans only 2.4, not > 2.4)
So, could the makefile (or scons equivalent, I don't really knows how this things works) be tweaked, or does the migration to python2.5 implies some more complicated changes ?
Thanks.
I've tried to recompile my little spring, and it seems the dependancy with python is tied to version 2.4 (ans only 2.4, not > 2.4)
So, could the makefile (or scons equivalent, I don't really knows how this things works) be tweaked, or does the migration to python2.5 implies some more complicated changes ?
Thanks.
Easily fixed. In <your source directory>/rts/build/scons, open config.py and search for the function check_libraries(). Scroll down a bit and comment out these lines:
You should have no trouble configuring/compiling Spring then.
Code: Select all
if not conf.CheckLib('python2.4') and not conf.CheckLib('python24'):
print 'python is required for this program'
env.Exit(1)
Ok, I changed the file config.py like this:
config.py:246
# second check for Windows.
if not conf.CheckLib('python2.5') and not conf.CheckLib('python25'):
print 'python is required for this program'
env.Exit(1)
config.py:171
def check_python(env, conf):
print "Checking for Python 2.5...",
print ""
guess_include_path(env, conf, 'Python', 'python')
(on this distrib, the directory /usr/include/python is a symbolic link to the current python release, so here python2.5)
And it does work !!
Thanks again.
config.py:246
# second check for Windows.
if not conf.CheckLib('python2.5') and not conf.CheckLib('python25'):
print 'python is required for this program'
env.Exit(1)
config.py:171
def check_python(env, conf):
print "Checking for Python 2.5...",
print ""
guess_include_path(env, conf, 'Python', 'python')
(on this distrib, the directory /usr/include/python is a symbolic link to the current python release, so here python2.5)
And it does work !!
Thanks again.
Python 2.5
I think I am running into the same problem with python 2.5. I used the advice to edit my config.py as shown and it worked lovely, I had been compiling for 10 minutes or so, well past the initial compiling problem, and then for some reason again I got this,
-I/usr/include/python2.4 tools/unitsync/pybind.cpp
tools/unitsync/pybind.cpp:4:20: error: Python.h: No such file or directory
tools/unitsync/pybind.cpp:66: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:75: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:84: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:92: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:99: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:106: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:113: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:123: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:132: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:140: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:149: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:156: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:164: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:172: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:180: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:189: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:196: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:205: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:214: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:222: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:229: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:237: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:296: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:334: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:342: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:350: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:358: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:365: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:373: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:381: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:389: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:397: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:405: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:413: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:420: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:428: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:436: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:445: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:460: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:468: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:476: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:486: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:494: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:503: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:516: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:525: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:541: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:551: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:563: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:584: error: 'PyMethodDef' does not name a type
tools/unitsync/pybind.cpp:660: error: expected constructor, destructor, or type conversion before 'initunitsync'
scons: *** [build/unitsync/tools/unitsync/pybind.os] Error 1
scons: building terminated because of errors.
I was hoping I just missed something in the config.py file but I checked it out and everything looked as it should. Any ideas? Thanks for the help ahead of time. -Brad
-I/usr/include/python2.4 tools/unitsync/pybind.cpp
tools/unitsync/pybind.cpp:4:20: error: Python.h: No such file or directory
tools/unitsync/pybind.cpp:66: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:75: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:84: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:92: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:99: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:106: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:113: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:123: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:132: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:140: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:149: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:156: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:164: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:172: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:180: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:189: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:196: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:205: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:214: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:222: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:229: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:237: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:296: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:334: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:342: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:350: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:358: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:365: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:373: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:381: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:389: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:397: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:405: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:413: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:420: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:428: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:436: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:445: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:460: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:468: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:476: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:486: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:494: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:503: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:516: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:525: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:541: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:551: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:563: error: expected initializer before '*' token
tools/unitsync/pybind.cpp:584: error: 'PyMethodDef' does not name a type
tools/unitsync/pybind.cpp:660: error: expected constructor, destructor, or type conversion before 'initunitsync'
scons: *** [build/unitsync/tools/unitsync/pybind.os] Error 1
scons: building terminated because of errors.
I was hoping I just missed something in the config.py file but I checked it out and everything looked as it should. Any ideas? Thanks for the help ahead of time. -Brad
Re: Python 2.5
Apparently it still can't find it. I wonder why the configure succeeds though, but maybe that is because of this modifications. EIther way, make sure you installed python development headers.wazzubrad wrote: tools/unitsync/pybind.cpp:4:20: error: Python.h: No such file or directory