Page 1 of 1
What about Python 2.5
Posted: 17 Dec 2006, 14:14
by nicko117
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.
Posted: 17 Dec 2006, 14:28
by Kloot
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:
Code: Select all
if not conf.CheckLib('python2.4') and not conf.CheckLib('python24'):
print 'python is required for this program'
env.Exit(1)
You should have no trouble configuring/compiling Spring then.
Posted: 17 Dec 2006, 20:14
by Tobi
If it compiles fine with that commented out, could you post here then I add checks for python2.5 too.
EDIT: oh btw, maybe don't comment them out as then python probably can't be found. Rather change 2.4 to 2.5 in those lines.
Posted: 18 Dec 2006, 00:09
by nicko117
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.
Posted: 06 Jan 2007, 19:51
by terrak
Thanks for the answer, I have the same problem with my OpenSuse 10.2
Python 2.5
Posted: 06 Jun 2007, 21:48
by wazzubrad
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
Re: Python 2.5
Posted: 06 Jun 2007, 22:02
by Tobi
wazzubrad wrote:
tools/unitsync/pybind.cpp:4:20: error: Python.h: No such file or directory
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.
Posted: 06 Jun 2007, 23:18
by wazzubrad
I located the python.h file in my /usr/include/python2.5 . So it is installed. Any other ideas?
Posted: 07 Jun 2007, 00:20
by Tobi
hm seems the unitsync file expects it to be called Python.h (note the big P)
Could rename it on line 4 of tools/unitsync/pybind.cpp, if it's indeed called python.h on your system..
Posted: 07 Jun 2007, 01:34
by wazzubrad
Whoops, it is Python.h. Sorry about that.
Posted: 07 Jun 2007, 23:08
by wazzubrad
any other ideas?
Posted: 08 Jun 2007, 16:36
by wazzubrad
Anything?