@@ -1942,9 +1942,6 @@ def __str__(self):
1942
1942
return 'Building project {}' .format (self .subject .name )
1943
1943
1944
1944
def build (self ):
1945
- if not self .args .force and not self .args .all and not self .needsBuild (None )[0 ]:
1946
- mx .log (f"Refusing build of { self .subject .name } . Use e.g. `mx -f --only { self .subject .name } ' to force a build." )
1947
- return True
1948
1945
args = [mx_subst .path_substitutions .substitute (a , dependency = self ) for a in self .subject .args ]
1949
1946
return self .run (args )
1950
1947
@@ -1983,34 +1980,6 @@ def run(self, args, env=None, cwd=None, **kwargs):
1983
1980
def src_dir (self ):
1984
1981
return self .subject .dir
1985
1982
1986
- def needsBuild (self , newestInput ):
1987
- tsNewest = 0
1988
- newestFile = None
1989
- for root , _ , files in os .walk (self .src_dir ()):
1990
- for f in files :
1991
- ts = os .path .getmtime (os .path .join (root , f ))
1992
- if tsNewest < ts :
1993
- tsNewest = ts
1994
- newestFile = f
1995
- tsOldest = sys .maxsize
1996
- oldestFile = None
1997
- for root , _ , files in os .walk (self .subject .get_output_root ()):
1998
- for f in files :
1999
- ts = os .path .getmtime (os .path .join (root , f ))
2000
- if tsOldest > ts :
2001
- tsOldest = ts
2002
- oldestFile = f
2003
- if tsOldest == sys .maxsize :
2004
- tsOldest = 0
2005
- if tsOldest < tsNewest :
2006
- self .clean (forBuild = "reallyForBuild" ) # we clean here, because setuptools doesn't check timestamps
2007
- if newestFile and oldestFile :
2008
- return (True , "rebuild needed, %s newer than %s" % (newestFile , oldestFile ))
2009
- else :
2010
- return (True , "build needed" )
2011
- else :
2012
- return (False , "up to date" )
2013
-
2014
1983
def newestOutput (self ):
2015
1984
return None
2016
1985
0 commit comments