diff --git a/mx.fastr/mx_fastr.py b/mx.fastr/mx_fastr.py index 83eb1a700ca15e6734de8e104773b7b971f0ca85..9212dc068b938e8e19fc8cd7b0fe65b5f9609545 100644 --- a/mx.fastr/mx_fastr.py +++ b/mx.fastr/mx_fastr.py @@ -27,7 +27,7 @@ import mx import mx_gate import mx_fastr_pkgs import mx_fastr_dists -from mx_fastr_dists import FastRReleaseProject, FastRNativeRecommendedProject #pylint: disable=unused-import +from mx_fastr_dists import FastRReleaseProject #pylint: disable=unused-import import mx_copylib import mx_fastr_edinclude import mx_unittest diff --git a/mx.fastr/mx_fastr_dists.py b/mx.fastr/mx_fastr_dists.py index 3007325ccd2e20101083954147db8afdbe5567e1..f97cd127b07c6734b970b88858d50f9b5e9af5ae 100644 --- a/mx.fastr/mx_fastr_dists.py +++ b/mx.fastr/mx_fastr_dists.py @@ -188,46 +188,13 @@ R_HOME_DIR="$( dirname "$r_bin" )" rscript_launcher = join(self.subject.dir, 'src', 'Rscript_launcher') self._template(rscript_launcher, join(bin_dir, 'Rscript'), template_dict) -class FastRNativeRecommendedProject(mx.NativeProject): - ''' - This finesses an ordering problem on installing the recommended R packages. - These must be installed by FastR using bin/R CMD INSTALL. That will invoke a - nested 'mx R' invocation which requires the FASTR distribution to be available. - However, this dependency cannot be specified in the suite.py file so we achieve - it here by ensuring that it is built prior to the native.recommended project. - ''' - def __init__(self, suite, name, deps, workingSets, theLicense, **args): - mx.NativeProject.__init__(self, suite, name, None, [], deps, workingSets, None, None, join(suite.dir, name), theLicense) - - def getBuildTask(self, args): - return NativeRecommendedBuildTask(self, args) - -class NativeRecommendedBuildTask(mx.NativeBuildTask): - def __init__(self, project, args): - mx.NativeBuildTask.__init__(self, args, project) - - def build(self): - # must archive FASTR before build so that nested mx R CMD INSTALL can execute - mx.archive(['@FASTR']) - mx.NativeBuildTask.build(self) - class FastRArchiveParticipant: def __init__(self, dist): self.dist = dist def __opened__(self, arc, srcArc, services): - # The release project states dependencies on the java projects in order - # to ensure they are built first. Therefore, the JarDistribution code - # will include all their class files at the top-level of the jar by default. - # Since we have already encapsulated the class files in 'fastr_jars/fastr.jar' we - # suppress their inclusion here by resetting the deps field. A bit of a hack. - if "FASTR_RELEASE" in self.dist.name: - assert isinstance(self.dist.deps[0], FastRReleaseProject) - self.release_project = self.dist.deps[0] - self.dist.deps[0].deps = [] - if hasattr(self.dist, '.archived_deps'): - delattr(self.dist, '.archived_deps') + pass def __add__(self, arcname, contents): return False @@ -236,11 +203,13 @@ class FastRArchiveParticipant: return False def __closing__(self): - if "FASTR_RELEASE" in self.dist.name and os.environ.has_key('FASTR_RELEASE'): - # the files copied in can be confused as source files by - # e.g., mx copyright, so delete them, specifically thne + if "FASTR_RELEASE" in self.dist.name and 'FASTR_RELEASE' in os.environ: + assert isinstance(self.dist.deps[0], FastRReleaseProject) + release_project = self.dist.deps[0] + # the files copied in can be confused as source files by + # e.g., mx copyright, so delete them, specifically the # include dir - include_dir = join(self.release_project.dir, 'include') + include_dir = join(release_project.dir, 'include') shutil.rmtree(include_dir) def mx_post_parse_cmd_line(opts): diff --git a/mx.fastr/suite.py b/mx.fastr/suite.py index 2f7d0b61631ac27a0b43a220eca8887eeaec82cb..9a6fe39e9eb56437399c024047a455aae907cbcc 100644 --- a/mx.fastr/suite.py +++ b/mx.fastr/suite.py @@ -1,5 +1,5 @@ suite = { - "mxversion" : "5.60.0", + "mxversion" : "5.141.1", "name" : "fastr", "versionConflictResolution" : "latest", "imports" : { @@ -297,7 +297,7 @@ suite = { "com.oracle.truffle.r.release" : { "sourceDirs" : ["src"], - "dependencies" : ["com.oracle.truffle.r.native.recommended"], + "buildDependencies" : ["com.oracle.truffle.r.native.recommended"], "class" : "FastRReleaseProject", "output" : "com.oracle.truffle.r.release" }, @@ -308,9 +308,9 @@ suite = { "com.oracle.truffle.r.engine", "com.oracle.truffle.r.ffi.impl" ], - "class" : "FastRNativeRecommendedProject", "native" : True, "workingSets" : "FastR", + "buildDependencies" : ["FASTR"], }, "com.oracle.truffle.r.test.tck" : {