>Hello! > >What a great project! > >I could not find build instructions for win32. Apparently P++ and >boost.python are required. Which versions? > >One remark using package_data for PYD files makes installer version >neutral (pure python) which is prevents auto selecting desired python >version when multiple interpreter versions are installed. > >regards, > >Niki Spahiev
Hi Niki, Thank you for your support. In order to build pythonOCC, you need latest version of PY++ and BOOST 1.34.1. Compilation fails with BOOST 1.35.0 (I use MSVC 2003 .NET). To achieve GCCXML parsing, OpenCascade header files need two minor hacks: * replace the line 27 of Standard_Real.hxx with the following line: #if !defined(__PYPLUSPLUS_GENERATION__) && defined(WNT) && !defined(__CYGWIN32__) && !defined(__MINGW32__) * in each .hxx file (more than 15000!), replace #include <xxxx.hxx> with #include "xxxx.hxx". I use the script below (I will upload it to the svn repository). Compilation time is about 3 hours on my laptop. At last, I did not understand the point dealing with distutils. Best regards, Thomas Paviot ================================================== # -*- coding: iso-8859-1 -*- #! /usr/bin/python # # This script modifies the .hxx OpenCascade headers in order to be properly # parsed by GCCXML. # # We have to transform all "#include <Standard.hxx>" includes by # " a double quote "#include "Standard.hxx" import glob import os, os.path OCC_INC = "C:\\Developpement\\pythonOCC\\inc" # # HXX OpenCascade header files # hxx_files = glob.glob(os.path.join(OCC_INC,"*.hxx")) lxx_files = glob.glob(os.path.join(OCC_INC,"*.lxx")) hxx_file_names=[] for name in hxx_files: hxx_file_names.append(os.path.split(name)[1]) lxx_file_names=[] for name in lxx_files: lxx_file_names.append(os.path.split(name)[1]) #print hxx_file_names def BACKUP(): # # For each OCC hxx # for hxx_file in hxx_files: fp = open(hxx_file,"ra") file_content = fp.read() fp.close() print hxx_file # print file_content # # First, make a backup of the original hxx file # hxx_file_backup = hxx_file+"BACKUP" fp = open(hxx_file_backup,"w+") fp.write(file_content) fp.close() def TRANSFORM(): for hxx_file in hxx_files: fp = open(hxx_file,"ra") file_content = fp.read() fp.close() # # Replace includes # for hxx_filename in hxx_file_names: file_content = file_content.replace('<%s>'%hxx_filename,'"%s"'%hxx_filename) for lxx_filename in lxx_file_names: file_content = file_content.replace('<%s>'%lxx_filename,'"%s"'%lxx_filename) # # Replace old_file # fp=open(hxx_file,"w+") fp.write(file_content) fp.close() for lxx_file in lxx_files: fp = open(lxx_file,"ra") file_content = fp.read() fp.close() # # Replace includes # for hxx_filename in hxx_file_names: file_content = file_content.replace('<%s>'%hxx_filename,'"%s"'%hxx_filename) for lxx_filename in lxx_file_names: file_content = file_content.replace('<%s>'%lxx_filename,'"%s"'%lxx_filename) # # Replace old_file # fp=open(lxx_file,"w+") fp.write(file_content) fp.close() TRANSFORM() _______________________________________________ Minerva-pythonocc mailing list Minerva-pythonocc@gna.org https://mail.gna.org/listinfo/minerva-pythonocc