From: Matthias B. <mb...@us...> - 2004-07-29 14:59:28
|
Update of /cvsroot/pyode/pyode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21925 Modified Files: setup.py Log Message: Check if ODE_BASE exists and don't scan the user-settings file anymore. This requires Pyrex 0.9.3 now. Index: setup.py =================================================================== RCS file: /cvsroot/pyode/pyode/setup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.py 7 Jul 2004 11:46:32 -0000 1.2 --- setup.py 29 Jul 2004 14:59:18 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- from distutils.core import setup, Extension + import distutils.sysconfig import shutil, os, os.path, sys *************** *** 11,15 **** if sys.platform=="win32": ! ODE_BASE = "../ode_float_trimesh" # ODE_BASE = "../ode_double_notrimesh" --- 12,16 ---- if sys.platform=="win32": ! ODE_BASE = "../ode_single_trimesh" # ODE_BASE = "../ode_double_notrimesh" *************** *** 19,23 **** CC_ARGS = ["/ML"] ! # Linux else: --- 20,24 ---- CC_ARGS = ["/ML"] ! # Linux (and other) else: *************** *** 57,73 **** # Determine the precision setting (SINGLE or DOUBLE?) ! try: ! precisionfile = "_precision.pyx" ! precision = determinePrecision() ! print "Precision:",precision ! print 'Creating file "%s"...'%precisionfile ! f = file(precisionfile, "wt") ! f.write("# This file was automatically generated by the setup script\n\n") ! f.write('cdef extern from "ode/ode.h":\n') ! f.write(' # Define the basic floating point type used in ODE\n') ! f.write(' ctypedef %s dReal\n'%{"SINGLE":"float", "DOUBLE":"double"}[precision]) ! f.close() ! except RuntimeError: ! print "Aborting!" sys.exit() --- 58,84 ---- # Determine the precision setting (SINGLE or DOUBLE?) ! #try: ! # precisionfile = "_precision.pyx" ! # precision = determinePrecision() ! # print "Precision:",precision ! # print 'Creating file "%s"...'%precisionfile ! # f = file(precisionfile, "wt") ! # f.write("# This file was automatically generated by the setup script\n\n") ! # f.write('cdef extern from "ode/ode.h":\n') ! # f.write(' # Define the basic floating point type used in ODE\n') ! # f.write(' ctypedef %s dReal\n'%{"SINGLE":"float", "DOUBLE":"double"}[precision]) ! # f.close() ! #except RuntimeError: ! # print "Aborting!" ! # sys.exit() ! ! # Check if the ODE_BASE path does exist ! if not os.path.exists(ODE_BASE): ! print """This Python ODE wrapper assumes that you have a compiled version of ! the ODE library already somewhere on your system. The path to the ODE ! distribution has to be set in the setup script via the variable ! ODE_BASE. Currently it points to "%s". ! However, that path does not exist. So please change the variable inside the ! script so that it points to the actual location of the ODE directory."""%ODE_BASE sys.exit() |