Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.65 diff -c -r1.65 setup.py *** setup.py 2001/11/24 09:28:42 1.65 --- setup.py 2001/12/10 12:37:13 *************** *** 733,738 **** --- 733,753 ---- # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) + + try: # this is something of a hack to semi-track dependencies + buildtime = os.path.getmtime("last_successful_build") + except OSError: + pass + else: + import glob + srcdir = sysconfig.get_config_var("srcdir") + files = glob.glob("%s/Include/*.h"%(srcdir,)) + ["pyconfig.h"] + times = map(os.path.getmtime, files) + modtime = max(times) + if modtime > buildtime: + print "REMOVING BUILD TREE" + os.system("rm -rf build") + setup(name = 'Python standard library', version = '%d.%d' % sys.version_info[:2], cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall}, *************** *** 743,748 **** --- 758,765 ---- # Scripts to install scripts = ['Tools/scripts/pydoc'] ) + # if setup() returns, it was successful: + os.system("touch last_successful_build") # --install-platlib if __name__ == '__main__':