lua: switch self.version[:2] to .up_to(2)

Previous package would not install correctly, would throw:
return os.path.join('share', 'lua', '%d.%d' % self.version[:2])
TypeError: %d format: a number is required, not Version
This commit is contained in:
Stephen Herbein 2016-07-07 18:54:34 -07:00
parent b9148b1751
commit 1a1bf31032

View File

@ -140,11 +140,11 @@ def setup_environment(self, spack_env, run_env):
@property
def lua_lib_dir(self):
return os.path.join('lib', 'lua', '%d.%d' % self.version[:2])
return os.path.join('lib', 'lua', self.version.up_to(2))
@property
def lua_share_dir(self):
return os.path.join('share', 'lua', '%d.%d' % self.version[:2])
return os.path.join('share', 'lua', self.version.up_to(2))
def setup_dependent_package(self, module, ext_spec):
"""