Skip to content

Commit 7919a3d

Browse files
committed
Rebuild frozen modules by default
1 parent 8af69bd commit 7919a3d

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,9 +1942,6 @@ def __str__(self):
19421942
return 'Building project {}'.format(self.subject.name)
19431943

19441944
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
19481945
args = [mx_subst.path_substitutions.substitute(a, dependency=self) for a in self.subject.args]
19491946
return self.run(args)
19501947

@@ -1983,34 +1980,6 @@ def run(self, args, env=None, cwd=None, **kwargs):
19831980
def src_dir(self):
19841981
return self.subject.dir
19851982

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-
20141983
def newestOutput(self):
20151984
return None
20161985

mx.graalpython/suite.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
],
278278
"platformDependent": False,
279279
"buildDependencies": [
280-
# a bit ugly, we need the same dist dependencies as the full GRAALPYTHON dist
280+
# a bit ugly, we need the same dist dependencies as the full GRAALPYTHON dist + python-lib
281281
"com.oracle.graal.python",
282282
"GRAALPYTHON-LAUNCHER",
283283
"GRAALPYTHON_JNI",
@@ -288,6 +288,7 @@
288288
"sdk:GRAAL_SDK",
289289
"sulong:SULONG_API",
290290
"sulong:SULONG_NATIVE", # this is actually just a runtime dependency
291+
"GRAALPYTHON_PYTHON_LIB",
291292
],
292293
},
293294

0 commit comments

Comments
 (0)