From ac7cc4b4cc35fcd2983e9e5e140abc0980641688 Mon Sep 17 00:00:00 2001 From: Gilles Duboscq <gilles.m.duboscq@oracle.com> Date: Sun, 8 Apr 2018 19:21:53 +0200 Subject: [PATCH] Remove <rffi> from graalvm distributions --- mx.fastr/mx_fastr_dists.py | 21 ++------------------- mx.fastr/suite.py | 21 +++++++-------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/mx.fastr/mx_fastr_dists.py b/mx.fastr/mx_fastr_dists.py index 6a1465aea1..18514fa1d6 100644 --- a/mx.fastr/mx_fastr_dists.py +++ b/mx.fastr/mx_fastr_dists.py @@ -196,30 +196,14 @@ class FastRArchiveParticipant: include_dir = join(release_project.dir, 'include') shutil.rmtree(include_dir) -def mx_post_parse_cmd_line(opts): - if os.environ.has_key('FASTR_RFFI'): - val = os.environ['FASTR_RFFI'] - else: - val = "" - if not mx.distribution('FASTR_RELEASE{}'.format(val), fatalIfMissing=False): - mx.instantiateDistribution('FASTR_RELEASE<rffi>', dict(rffi=val)) - if not val and os.environ.has_key('FASTR_RELEASE'): - _instantiate_graalvm_support_dist() +def mx_post_parse_cmd_line(opts): + mx.instantiateDistribution('FASTR_RELEASE<rffi>', dict(rffi=mx.get_env('FASTR_RFFI', ''))) for dist in mx_fastr._fastr_suite.dists: if isinstance(dist, mx.JARDistribution): dist.set_archiveparticipant(FastRArchiveParticipant(dist)) -def _instantiate_graalvm_support_dist(): - if os.environ.has_key('FASTR_RFFI'): - mx.abort('Cannot instantiate the GraalVM support distribution when \'FASTR_RFFI\' is set. Found: \'{}\''.format(os.environ.has_key('FASTR_RFFI'))) - if not os.environ.has_key('FASTR_RELEASE'): - mx.abort('Cannot instantiate the GraalVM support distribution when \'FASTR_RELEASE\' is not set.') - if not mx.distribution('FASTR_GRAALVM_RELEASE', fatalIfMissing=False): - mx.instantiateDistribution('fastr:FASTR_GRAALVM_RELEASE<rffi>', dict(rffi='', os=mx.get_os(), arch=mx.get_arch())) - if not mx.distribution('fastr:FASTR_GRAALVM_SUPPORT', fatalIfMissing=False): - mx.instantiateDistribution('fastr:FASTR_GRAALVM_SUPPORT<rffi>', dict(rffi='')) mx_sdk.register_component(mx_sdk.GraalVmLanguage( name='FastR', @@ -236,5 +220,4 @@ mx_sdk.register_component(mx_sdk.GraalVmLanguage( 'link:<support>/bin/Rscript', 'link:<support>/bin/exec/R', ], - instantiate_dist=_instantiate_graalvm_support_dist, )) diff --git a/mx.fastr/suite.py b/mx.fastr/suite.py index b30fdbc9a3..88985caf9e 100644 --- a/mx.fastr/suite.py +++ b/mx.fastr/suite.py @@ -463,22 +463,15 @@ suite = { }, }, - "FASTR_GRAALVM_RELEASE<rffi>": { + "FASTR_GRAALVM_RELEASE": { "native" : True, "platformDependent" : True, "relpath" : True, "description" : "a binary release of FastR", "dependencies" : ["com.oracle.truffle.r.release"], - "os_arch" : { - "<others>" : { - "<others>" : { - "path" : "mxbuild/dists/<os>/<arch>/<rffi>/fastr-graalvm-release.tar.gz", - }, - }, - }, }, - "FASTR_GRAALVM_SUPPORT<rffi>" : { + "FASTR_GRAALVM_SUPPORT" : { "native" : True, "platformDependent" : True, "description" : "FastR support distribution for the GraalVM", @@ -486,7 +479,7 @@ suite = { "./" : [ { "source_type" : "extracted-dependency", - "dependency" : "FASTR_GRAALVM_RELEASE<rffi>", + "dependency" : "FASTR_GRAALVM_RELEASE", "path" : "*", "exclude" : [ "COPYRIGHT", @@ -499,7 +492,7 @@ suite = { }, { "source_type" : "extracted-dependency", - "dependency" : "FASTR_GRAALVM_RELEASE<rffi>", + "dependency" : "FASTR_GRAALVM_RELEASE", "path" : "bin/fastr_jars/*", "exclude" : [ "bin/fastr_jars/fastr.jar", @@ -509,9 +502,9 @@ suite = { }, "dependency:fastr:GNUR", ], - "COPYRIGHT_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE<rffi>/COPYRIGHT", - "LICENSE_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE<rffi>/LICENSE", - "README_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE<rffi>/README.md", + "COPYRIGHT_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/COPYRIGHT", + "LICENSE_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/LICENSE", + "README_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/README.md", "bin/Rscript" : "file:com.oracle.truffle.r.release/src/Rscript_legacy", "bin/exec/R" : "file:com.oracle.truffle.r.release/src/R_legacy", "legacy/" : "dependency:fastr:FASTR_LEGACY_LAUNCHER", -- GitLab