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
@ -594,4 +594,6 @@ def mime_type(file):
|
|||||||
file_cmd = Executable('file')
|
file_cmd = Executable('file')
|
||||||
output = file_cmd('-b', '-h', '--mime-type', file, output=str, error=str)
|
output = file_cmd('-b', '-h', '--mime-type', file, output=str, error=str)
|
||||||
tty.debug('[MIME_TYPE] {0} -> {1}'.format(file, output.strip()))
|
tty.debug('[MIME_TYPE] {0} -> {1}'.format(file, output.strip()))
|
||||||
|
if '/' not in output:
|
||||||
|
output += '/'
|
||||||
return tuple(output.strip().split('/'))
|
return tuple(output.strip().split('/'))
|
||||||
|
@ -26,6 +26,6 @@ class Libxpm(AutotoolsPackage):
|
|||||||
depends_on('pkgconfig', type='build')
|
depends_on('pkgconfig', type='build')
|
||||||
depends_on('util-macros', type='build')
|
depends_on('util-macros', type='build')
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
# def setup_environment(self, spack_env, run_env):
|
||||||
spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
|
# spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
|
||||||
self.spec['gettext'].prefix.lib))
|
# self.spec['gettext'].prefix.lib))
|
||||||
|
@ -501,12 +501,10 @@ def cmake_args(self):
|
|||||||
self.spec['ftgl'].prefix))
|
self.spec['ftgl'].prefix))
|
||||||
options.append('-DFTGL_INCLUDE_DIR={0}'.format(
|
options.append('-DFTGL_INCLUDE_DIR={0}'.format(
|
||||||
self.spec['ftgl'].prefix.include))
|
self.spec['ftgl'].prefix.include))
|
||||||
|
|
||||||
# see https://github.com/spack/spack/pull/11579
|
# see https://github.com/spack/spack/pull/11579
|
||||||
if '+python' in self.spec:
|
if '+python' in self.spec:
|
||||||
options.append('-DPYTHON_EXECUTABLE=%s' %
|
options.append('-DPYTHON_EXECUTABLE=%s' %
|
||||||
spec['python'].command.path)
|
spec['python'].command.path)
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
|
Loading…
Reference in New Issue
Block a user