spark: remove whitespaces from run_env variable (#4210)
This commit is contained in:
parent
17b2db0bd2
commit
e4a3295c37
@ -22,10 +22,11 @@
|
|||||||
# License along with this program; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
import re
|
||||||
|
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Spark(Package):
|
class Spark(Package):
|
||||||
"""Apache Spark is a fast and general engine
|
"""Apache Spark is a fast and general engine
|
||||||
@ -72,4 +73,8 @@ def setup_environment(self, spack_env, run_env):
|
|||||||
hadoop = self.spec['hadoop'].command
|
hadoop = self.spec['hadoop'].command
|
||||||
hadoop_classpath = hadoop('classpath', return_output=True)
|
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)
|
run_env.set('SPARK_DIST_CLASSPATH', hadoop_classpath)
|
||||||
|
Loading…
Reference in New Issue
Block a user