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:
Patrick Gartung 2019-06-04 14:39:04 -05:00 committed by GitHub
parent a7776972ad
commit 964a1d5997
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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('/'))

View file

@ -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))

View file

@ -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):