summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@informatik.uni-hamburg.de>2019-10-23 21:15:30 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-23 14:15:30 -0500
commit420346b275c19806bc83e4f421109ee8edded369 (patch)
treea536e0adc08a9f20e57dd265eee1000996b944b0
parentb7536eb3323309b47a2f17883f0ad75cf1fa1e90 (diff)
downloadspack-420346b275c19806bc83e4f421109ee8edded369.tar.gz
spack-420346b275c19806bc83e4f421109ee8edded369.tar.bz2
spack-420346b275c19806bc83e4f421109ee8edded369.tar.xz
spack-420346b275c19806bc83e4f421109ee8edded369.zip
mysql: Use correct python command (#13393)
* mysql: Use correct python command python~pythoncmd does not provide a python symlink for python3, so make sure we pick the right command. * mysql: Adapt to build env changes
-rw-r--r--var/spack/repos/builtin/packages/mysql/package.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/mysql/package.py b/var/spack/repos/builtin/packages/mysql/package.py
index ec5d7d183d..497b8568a8 100644
--- a/var/spack/repos/builtin/packages/mysql/package.py
+++ b/var/spack/repos/builtin/packages/mysql/package.py
@@ -122,7 +122,7 @@ class Mysql(CMakePackage):
options.append('-DWITHOUT_SERVER:BOOL=ON')
return options
- def _fix_dtrace_shebang(self, spack_env):
+ def _fix_dtrace_shebang(self, build_env):
# dtrace may cause build to fail because it uses
# '/usr/bin/python' in the shebang. To work around that we copy
# the original script into a temporary folder, and change the
@@ -135,27 +135,28 @@ class Mysql(CMakePackage):
copy(dtrace, dtrace_copy)
filter_file(
'^#!/usr/bin/python',
- '#!/usr/bin/env python',
+ '#!/usr/bin/env {0}'.format(
+ os.path.basename(self.spec['python'].command)),
dtrace_copy
)
# To have our own copy of dtrace in PATH, we need to
# prepend to PATH the temporary folder where it resides.
- spack_env.prepend_path('PATH', dtrace_copy_path)
+ build_env.prepend_path('PATH', dtrace_copy_path)
@run_before('cmake')
def _maybe_fix_dtrace_shebang(self):
if 'python' in self.spec.flat_dependencies() and \
self.spec.satisfies('@:7.99.99'):
- self._fix_dtrace_shebang(spack_env)
+ self._fix_dtrace_shebang(build_env)
- def setup_environment(self, spack_env, run_env):
+ def setup_build_environment(self, env):
cxxstd = self.spec.variants['cxxstd'].value
flag = getattr(self.compiler, 'cxx{0}_flag'.format(cxxstd))
if flag:
- spack_env.append_flags('CXXFLAGS', flag)
+ env.append_flags('CXXFLAGS', flag)
if cxxstd != '98':
if int(cxxstd) > 11:
- spack_env.append_flags('CXXFLAGS',
- '-Wno-deprecated-declarations')
+ env.append_flags('CXXFLAGS',
+ '-Wno-deprecated-declarations')
if int(cxxstd) > 14:
- spack_env.append_flags('CXXFLAGS', '-Wno-error=register')
+ env.append_flags('CXXFLAGS', '-Wno-error=register')