You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by ni...@apache.org on 2017/07/24 22:04:57 UTC
systemml git commit: [SYSTEMML-1802] Fix build failure for
distribution profile on Windows
Repository: systemml
Updated Branches:
refs/heads/master ee2b37e4f -> 11b689d49
[SYSTEMML-1802] Fix build failure for distribution profile on Windows
Closes #594.
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/11b689d4
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/11b689d4
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/11b689d4
Branch: refs/heads/master
Commit: 11b689d49b78a73f44b5944cfe0d14bb7c05c3a7
Parents: ee2b37e
Author: Niketan Pansare <np...@us.ibm.com>
Authored: Mon Jul 24 15:02:55 2017 -0700
Committer: Niketan Pansare <np...@us.ibm.com>
Committed: Mon Jul 24 15:02:55 2017 -0700
----------------------------------------------------------------------
src/main/python/post_setup.py | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/systemml/blob/11b689d4/src/main/python/post_setup.py
----------------------------------------------------------------------
diff --git a/src/main/python/post_setup.py b/src/main/python/post_setup.py
index 7154ece..d968d2d 100644
--- a/src/main/python/post_setup.py
+++ b/src/main/python/post_setup.py
@@ -34,11 +34,8 @@ ARTIFACT_VERSION = __project_version__
ARTIFACT_VERSION_SHORT = ARTIFACT_VERSION.split("-")[0]
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd())))
-if platform.system() == "Windows":
- os.rename(
- os.path.join(root_dir, 'target', ARTIFACT_NAME + '-' + ARTIFACT_VERSION_SHORT + '.zip'),
- os.path.join(root_dir, 'target', ARTIFACT_NAME + '-' + ARTIFACT_VERSION + '-python.zip'))
-else:
- os.rename(
- os.path.join(root_dir, 'target', ARTIFACT_NAME + '-' + ARTIFACT_VERSION_SHORT + '.tar.gz'),
- os.path.join(root_dir, 'target', ARTIFACT_NAME + '-' + ARTIFACT_VERSION + '-python.tgz'))
+src_path_prefix = os.path.join(root_dir, 'target', ARTIFACT_NAME + '-' + ARTIFACT_VERSION_SHORT)
+src_path = src_path_prefix + '.zip' if platform.system() == "Windows" and os.path.exists(src_path_prefix + '.zip') else src_path_prefix + '.tar.gz'
+os.rename(
+ src_path,
+ os.path.join(root_dir, 'target', ARTIFACT_NAME + '-' + ARTIFACT_VERSION + '-python.tgz'))