Repository: incubator-systemml
Updated Branches:
  refs/heads/branch-0.12 379d69063 -> 6837b9a2e


[SYSTEMML-1198] Ensure release jar included an loaded in Python release artifact

Added check for jar without 'snapshot' in file name to handle python artifact
from release build.

Closes #362.


Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/6837b9a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/6837b9a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/6837b9a2

Branch: refs/heads/branch-0.12
Commit: 6837b9a2e85ae0a6b93be6b1920a3e75f12034a2
Parents: 379d690
Author: Glenn Weidner <gweid...@us.ibm.com>
Authored: Thu Jan 26 09:09:34 2017 -0800
Committer: Glenn Weidner <gweid...@us.ibm.com>
Committed: Thu Jan 26 09:09:34 2017 -0800

----------------------------------------------------------------------
 src/main/python/pre_setup.py            | 2 +-
 src/main/python/systemml/classloader.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6837b9a2/src/main/python/pre_setup.py
----------------------------------------------------------------------
diff --git a/src/main/python/pre_setup.py b/src/main/python/pre_setup.py
index 394c4e5..5443a6d 100644
--- a/src/main/python/pre_setup.py
+++ b/src/main/python/pre_setup.py
@@ -30,6 +30,6 @@ if os.path.exists(java_dir_full_path):
 os.mkdir(java_dir_full_path)
 root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd())))
 for file in os.listdir(os.path.join(root_dir, 'target')):
-    if fnmatch.fnmatch(file, 'systemml-*-incubating-SNAPSHOT.jar'):
+    if fnmatch.fnmatch(file, 'systemml-*-incubating-SNAPSHOT.jar') or 
fnmatch.fnmatch(file, 'systemml-*-incubating.jar'):
         shutil.copyfile(os.path.join(root_dir, 'target', file),
                         os.path.join(java_dir_full_path, file))

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6837b9a2/src/main/python/systemml/classloader.py
----------------------------------------------------------------------
diff --git a/src/main/python/systemml/classloader.py 
b/src/main/python/systemml/classloader.py
index 1085be4..79c0aad 100644
--- a/src/main/python/systemml/classloader.py
+++ b/src/main/python/systemml/classloader.py
@@ -55,7 +55,7 @@ def createJavaObject(sc, obj_type):
         jar_file_name = '_ignore.jar'
         java_dir = os.path.join(imp.find_module("systemml")[1], 
"systemml-java")
         for file in os.listdir(java_dir):
-            if fnmatch.fnmatch(file, 'systemml-*-incubating-SNAPSHOT.jar'):
+            if fnmatch.fnmatch(file, 'systemml-*-incubating-SNAPSHOT.jar') or 
fnmatch.fnmatch(file, 'systemml-*-incubating.jar'):
                 jar_file_name = os.path.join(java_dir, file)
         err_msg = 'Unable to load SystemML.jar into current pyspark session.'
         hint = 'Provide the following argument to pyspark: --driver-class-path 
'

Reply via email to