Update of /cvsroot/pyode/pyode
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23145
Modified Files:
setup.py
Log Message:
Only update ode.c if a *.pyx file was modified
Index: setup.py
===================================================================
RCS file: /cvsroot/pyode/pyode/setup.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** setup.py 29 Jul 2004 20:17:13 -0000 1.4
--- setup.py 9 Nov 2004 22:22:07 -0000 1.5
***************
*** 7,11 ****
from distutils.core import setup, Extension
import distutils.sysconfig
! import shutil, os, os.path, sys
# Should the wrapper support trimesh geoms?
--- 7,12 ----
from distutils.core import setup, Extension
import distutils.sysconfig
! import shutil, os, os.path, sys, glob
! from stat import *
# Should the wrapper support trimesh geoms?
***************
*** 97,104 ****
! # Generate the C source file
cmd = "pyrexc -o ode.c -I. -Isrc src/ode.pyx"
! print cmd
! err = os.system(cmd)
if err!=0:
print "An error occured while generating the C source file."
--- 98,126 ----
! # Generate the C source file (if necessary)
cmd = "pyrexc -o ode.c -I. -Isrc src/ode.pyx"
! pyrex_out = "ode.c"
!
! # Check if the pyrex output is still up to date or if it has to be generated
! # (ode.c will be updated if any of the *.pyx files in the directory "src"
! # is newer than ode.c)
! if os.access(pyrex_out, os.F_OK):
! ctime = os.stat(pyrex_out)[ST_MTIME]
! for pyx in glob.glob("src/*.pyx"):
! pytime = os.stat(pyx)[ST_MTIME]
! if pytime>ctime:
! print "Updating",pyrex_out
! print cmd
! err = os.system(cmd)
! break
! else:
! print pyrex_out,"is up to date"
! err = 0
! else:
! print "Creating",pyrex_out
! print cmd
! err = os.system(cmd)
!
! # Check if calling pyrex produced an error
if err!=0:
print "An error occured while generating the C source file."
***************
*** 107,121 ****
# Compile the module
! setup(name="pyODE",
! # version="0.35cvs-2",
! description="Python wrapper for the Open Dynamics Engine",
! # author="Matthias Baas",
! # author_email="ba...@ir...",
! # license="BSD license, see license*.txt",
! packages=["xode"],
! ext_modules=[Extension("ode", ["ode.c"]
! ,libraries=LIBS
! ,include_dirs=INC_DIRS
! ,library_dirs=LIB_DIRS
! ,extra_compile_args=CC_ARGS)
! ])
--- 129,144 ----
# Compile the module
! setup(name = "pyODE",
! version = "1.0.0",
! description = "Python wrapper for the Open Dynamics Engine",
! author = "see file AUTHORS",
! # author_email = "ba...@ir...",
! license = "BSD or LGPL",
! url = "http://pyode.sourceforge.net/",
! packages = ["xode"],
! ext_modules = [Extension("ode", ["ode.c"]
! ,libraries=LIBS
! ,include_dirs=INC_DIRS
! ,library_dirs=LIB_DIRS
! ,extra_compile_args=CC_ARGS)
! ])
|