Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
13b57edc
Commit
13b57edc
authored
8 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
mx.fastr: remove unnecessary delegation to mx_fastr_dists
parent
14e928fa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mx.fastr/mx_fastr.py
+1
-25
1 addition, 25 deletions
mx.fastr/mx_fastr.py
mx.fastr/mx_fastr_dists.py
+17
-4
17 additions, 4 deletions
mx.fastr/mx_fastr_dists.py
with
18 additions
and
29 deletions
mx.fastr/mx_fastr.py
+
1
−
25
View file @
13b57edc
...
...
@@ -27,6 +27,7 @@ import mx
import
mx_gate
import
mx_fastr_pkgs
import
mx_fastr_dists
from
mx_fastr_dists
import
FastRNativeProject
,
FastRTestNativeProject
,
FastRReleaseProject
#pylint: disable=unused-import
import
os
'''
...
...
@@ -500,31 +501,6 @@ def rcmplib(args):
cp
=
mx
.
classpath
([
pcp
.
name
for
pcp
in
mx
.
projects_opt_limit_to_suites
()])
mx
.
run_java
([
'
-cp
'
,
cp
,
'
com.oracle.truffle.r.test.tools.cmpr.CompareLibR
'
]
+
cmpArgs
)
class
FastRNativeProject
(
mx_fastr_dists
.
DelFastRNativeProject
):
'''
Custom class for building the com.oracle.truffle.r.native project.
Delegates to mx_fastr_dists.DelFastRNativeProject to keep this file uncluttered
'''
def
__init__
(
self
,
suite
,
name
,
deps
,
workingSets
,
theLicense
,
**
args
):
mx_fastr_dists
.
DelFastRNativeProject
.
__init__
(
self
,
suite
,
name
,
deps
,
workingSets
,
theLicense
)
class
FastRTestNativeProject
(
mx_fastr_dists
.
DelFastRTestNativeProject
):
'''
Custom class for building the com.oracle.truffle.r.test.native project.
Delegates to mx_fastr_dists.DelFastRTestNativeProject to keep this file uncluttered
'''
def
__init__
(
self
,
suite
,
name
,
deps
,
workingSets
,
theLicense
,
**
args
):
mx_fastr_dists
.
DelFastRTestNativeProject
.
__init__
(
self
,
suite
,
name
,
deps
,
workingSets
,
theLicense
)
class
FastRReleaseProject
(
mx_fastr_dists
.
DelFastRReleaseProject
):
'''
Custom class for creating the FastR release project, which supports the
FASTR_RELEASE distribution.
Delegates to mx_fastr_dists.DelFastRReleaseProject to keep this file uncluttered
'''
def
__init__
(
self
,
suite
,
name
,
deps
,
workingSets
,
theLicense
,
**
args
):
mx_fastr_dists
.
DelFastRReleaseProject
.
__init__
(
self
,
suite
,
name
,
deps
,
workingSets
,
theLicense
)
def
mx_post_parse_cmd_line
(
opts
):
mx_fastr_dists
.
mx_post_parse_cmd_line
(
opts
)
...
...
This diff is collapsed.
Click to expand it.
mx.fastr/mx_fastr_dists.py
+
17
−
4
View file @
13b57edc
...
...
@@ -43,7 +43,7 @@ class FastRProjectAdapter(mx.ArchivableProject):
results
.
append
(
join
(
root
,
f
))
class
Del
FastRNativeProject
(
FastRProjectAdapter
):
class
FastRNativeProject
(
FastRProjectAdapter
):
'''
Custom class for building the com.oracle.truffle.r.native project.
The customization is to support the creation of an exact FASTR_NATIVE_DEV distribution.
...
...
@@ -111,7 +111,7 @@ class DelFastRNativeProject(FastRProjectAdapter):
return
results
class
Del
FastRTestNativeProject
(
FastRProjectAdapter
):
class
FastRTestNativeProject
(
FastRProjectAdapter
):
'''
Custom class for building the com.oracle.truffle.r.native project.
The customization is to support the creation of an exact FASTR_NATIVE_DEV distribution.
...
...
@@ -147,7 +147,7 @@ class DelFastRTestNativeProject(FastRProjectAdapter):
results
.
append
(
join
(
self
.
dir
,
'
urand
'
,
'
lib
'
,
'
liburand.so
'
))
return
results
class
Del
FastRReleaseProject
(
FastRProjectAdapter
):
class
FastRReleaseProject
(
FastRProjectAdapter
):
'''
Custom class for creating the FastR release project, which supports the
FASTR_RELEASE distribution.
...
...
@@ -159,6 +159,7 @@ class DelFastRReleaseProject(FastRProjectAdapter):
results
=
[]
for
rdir
in
[
'
bin
'
,
'
lib
'
,
'
library
'
,
'
etc
'
,
'
share
'
,
'
doc
'
]:
self
.
_get_files
(
rdir
,
results
)
results
.
append
(
join
(
self
.
dir
,
'
LICENSE.FASTR
'
))
return
results
def
getBuildTask
(
self
,
args
):
...
...
@@ -186,6 +187,18 @@ class ReleaseBuildTask(mx.NativeBuildTask):
if
os
.
path
.
exists
(
target_dir
):
shutil
.
rmtree
(
target_dir
)
shutil
.
copytree
(
join
(
fastr_dir
,
d
),
target_dir
)
# copyrights
copyrights_dir
=
join
(
fastr_dir
,
'
mx.fastr
'
,
'
copyrights
'
)
with
open
(
join
(
output_dir
,
'
LICENSE.FASTR
'
),
'
w
'
)
as
outfile
:
for
copyright_file
in
os
.
listdir
(
copyrights_dir
):
basename
=
os
.
path
.
basename
(
copyright_file
)
if
not
basename
.
endswith
(
'
copyright.star
'
)
and
not
basename
.
endswith
(
'
copyright.hash
'
):
continue
with
open
(
join
(
copyrights_dir
,
copyright_file
))
as
infile
:
data
=
infile
.
read
()
outfile
.
write
(
data
)
# canonicalize R_HOME_DIR in bin/R
bin_dir
=
join
(
output_dir
,
'
bin
'
)
rcmd
=
join
(
bin_dir
,
'
R
'
)
...
...
@@ -256,7 +269,7 @@ class FastRArchiveParticipant:
# Since we have already encapsulated the class files in 'jjars/fastr.jar' we
# suppress their inclusion here by resetting the deps filed. A bit of a hack.
if
self
.
dist
.
name
==
"
FASTR_RELEASE
"
:
assert
isinstance
(
self
.
dist
.
deps
[
0
],
Del
FastRReleaseProject
)
assert
isinstance
(
self
.
dist
.
deps
[
0
],
FastRReleaseProject
)
self
.
dist
.
deps
[
0
].
deps
=
[]
def
__add__
(
self
,
arcname
,
contents
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment