summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-05-21 06:40:59 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-05-20 23:40:59 -0500
commite4a3295c37f3bc68a659f7400ef3315d75b6e2ca (patch)
tree1d7c43c699407227b0e55ad6191db0f7d36ef399
parent17b2db0bd215bbd77319484b76bc8d950fa7564d (diff)
downloadspack-e4a3295c37f3bc68a659f7400ef3315d75b6e2ca.tar.gz
spack-e4a3295c37f3bc68a659f7400ef3315d75b6e2ca.tar.bz2
spack-e4a3295c37f3bc68a659f7400ef3315d75b6e2ca.tar.xz
spack-e4a3295c37f3bc68a659f7400ef3315d75b6e2ca.zip
spark: remove whitespaces from run_env variable (#4210)
-rw-r--r--var/spack/repos/builtin/packages/spark/package.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/spark/package.py b/var/spack/repos/builtin/packages/spark/package.py
index 3bc6abd234..e955a75985 100644
--- a/var/spack/repos/builtin/packages/spark/package.py
+++ b/var/spack/repos/builtin/packages/spark/package.py
@@ -22,10 +22,11 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
-
+import re
import shutil
+from spack import *
+
class Spark(Package):
"""Apache Spark is a fast and general engine
@@ -72,4 +73,8 @@ class Spark(Package):
hadoop = self.spec['hadoop'].command
hadoop_classpath = hadoop('classpath', return_output=True)
+ # Remove whitespaces, as they can compromise syntax in
+ # module files
+ hadoop_classpath = re.sub('[\s+]', '', hadoop_classpath)
+
run_env.set('SPARK_DIST_CLASSPATH', hadoop_classpath)