Buildcache relocate.py error fix (#11616)
* Add a trailing / if file --mime does not return a mimetype with a / in it * Flake8
This commit is contained in:
parent
a7776972ad
commit
964a1d5997
3 changed files with 5 additions and 5 deletions
|
@ -594,4 +594,6 @@ def mime_type(file):
|
|||
file_cmd = Executable('file')
|
||||
output = file_cmd('-b', '-h', '--mime-type', file, output=str, error=str)
|
||||
tty.debug('[MIME_TYPE] {0} -> {1}'.format(file, output.strip()))
|
||||
if '/' not in output:
|
||||
output += '/'
|
||||
return tuple(output.strip().split('/'))
|
||||
|
|
|
@ -26,6 +26,6 @@ class Libxpm(AutotoolsPackage):
|
|||
depends_on('pkgconfig', type='build')
|
||||
depends_on('util-macros', type='build')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
|
||||
self.spec['gettext'].prefix.lib))
|
||||
# def setup_environment(self, spack_env, run_env):
|
||||
# spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
|
||||
# self.spec['gettext'].prefix.lib))
|
||||
|
|
|
@ -501,12 +501,10 @@ def cmake_args(self):
|
|||
self.spec['ftgl'].prefix))
|
||||
options.append('-DFTGL_INCLUDE_DIR={0}'.format(
|
||||
self.spec['ftgl'].prefix.include))
|
||||
|
||||
# see https://github.com/spack/spack/pull/11579
|
||||
if '+python' in self.spec:
|
||||
options.append('-DPYTHON_EXECUTABLE=%s' %
|
||||
spec['python'].command.path)
|
||||
|
||||
return options
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
|
|
Loading…
Reference in a new issue