* make clean_sphinx a command function

* Move sphinx specific stuff to the sphinx command out of the etg command
* Make it possible to not run the docs generator
* Don't update some files unless they are newer or changed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-12-31 09:50:25 +00:00
parent 17d7497913
commit a22be70a88
3 changed files with 84 additions and 63 deletions

View File

@@ -17,6 +17,7 @@ import glob
import fnmatch
import tempfile
import commands
import shutil
from distutils.file_util import copy_file
from distutils.dir_util import mkpath
@@ -586,3 +587,10 @@ def wxDir():
assert WXWIN not in [None, '']
return WXWIN
def copyIfNewer(src, dest):
if os.path.isdir(dest):
dest = os.path.join(dest, os.path.basename(src))
if newer(src, dest):
shutil.copy(src, dest)