Building under windows7 + Python27 + VS2015

only_a_ptr

17-01-2016 21:33:42

Hello everyone.

I'd like to build https://bitbucket.org/dermont/python-ogre (branch 1-9) under Windows7 64-bit (target: 32-bit) using "Visual Studio 2015 Community".

PyOgre has no README/tutorial for 1-9 and a build script "scripts/build-windows-release.py" references old Sourceforge repository, so I guess it's not up-to-date.

Is there any tutorial for building the 1-9 branch on windows? Is Python3 supported?

I'm going to try searching for more info/eventually build using branch 1-10's instructions. I'll track my progress here.

EDIT1: Reading through. Last updated: 2011 http://wiki.python-ogre.org/index.php?t ... owsBuildV2

EDIT2: I decided to try branch-1-10 first, following it's README. It doesn't say whether Python3 is supported, but I guess no... using 2.7.11
This is what I ended with:

d:\Source\PythonOgre-bitbucket-dermont-v1-10>c:\python27\python BuildModule.py -r -b ogre
Traceback (most recent call last):
File "BuildModule.py", line 10, in <module>
import environment
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 455, in <module>
class gccxml(module):
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 460, in gccxml
[git, " clone git://github.com/gccxml/gccxml.git gccxml", downloadPath]
NameError: name 'git' is not defined

Apparently the build is broken under windows ... the "git" variable is only defined if plattform is Linux: https://bitbucket.org/dermont/python-og ... py-315:325
BTW my Git is in PATH

EDIT3: I added ```git = "git "``` line, this came next:
d:\Source\PythonOgre-bitbucket-dermont-v1-10>c:\python27\python BuildModule.py -r -b ogre
Traceback (most recent call last):
File "BuildModule.py", line 10, in <module>
import environment
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 928, in <module>
class ogre(pymodule):
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 971, in ogre
cmake_command = (cmakecmd + " .. -DOGRE_DEPENDENCIES_DIR=\"%s\" "
NameError: name 'cmakecmd' is not defined


EDIT4: I added ```cmakecmd = " cmake "``` to windows setup and put my cmake-3.4.1-win32-x86\ to PATH
d:\Source\PythonOgre-bitbucket-dermont-v1-10>c:\python27\python BuildModule.py -r -b ogre
Traceback (most recent call last):
File "BuildModule.py", line 10, in <module>
import environment
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 929, in <module>
class ogre(pymodule):
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 1034, in ogre
[touch, 'CMakeLists.cache' , os.path.join(download_dir, baseDir,'build')],
NameError: name 'touch' is not defined

Right "touch"... what now?

EDIT5: Ok, I'll take my chances with this replacement of 'touch':
@echo off
if exist %1 (
::http://superuser.com/a/764721
copy /b %1+,, %1
) else (
::http://stackoverflow.com/a/211045
copy NUL %1
)

Tested manually, it's working. I'm adding ``` touch = "d:\Source\PythonOgre-bitbucket-dermont-v1-10\ohl_touch.cmd " ``` to environment.py and trying...
Result:
d:\Source\PythonOgre-bitbucket-dermont-v1-10>c:\python27\python BuildModule.py -r -b ogre
Traceback (most recent call last):
File "BuildModule.py", line 10, in <module>
import environment
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 1421, in <module>
class caelum(pymodule):
File "d:\Source\PythonOgre-bitbucket-dermont-v1-10\environment.py", line 1454, in caelum
Config.PATH_INCLUDE_caelum,
AttributeError: 'module' object has no attribute 'PATH_INCLUDE_caelum'

Ok, this is different. I'm going to sleep on it :)

Root13

08-11-2016 13:46:26

Here's a good blog about Python, if you're interested http://djangostars.com/blog/