From 1a1bf31032fca3d61d1ae9209f9c77a4822eb733 Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Thu, 7 Jul 2016 18:54:34 -0700 Subject: 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 --- var/spack/repos/builtin/packages/lua/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 761932361b..48c1c6a919 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -140,11 +140,11 @@ class Lua(Package): @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): """ -- cgit v1.2.3-70-g09d2