From 8de84b5d8ab789a86b757e0a2e598aa88d4034df Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 11 Jul 2016 16:56:26 -0500 Subject: Fix error reported on Google Groups list Fixes the reported `TypeError: not enough arguments for format string` error. --- var/spack/repos/builtin/packages/libxml2/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index baaa2fc83d..f5b65c1d24 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Libxml2(Package): """Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free @@ -42,8 +43,11 @@ class Libxml2(Package): def install(self, spec, prefix): if '+python' in spec: - site_packages_dir = os.path.join(prefix, 'lib/python%s.%s/site-packages' %(spec['python'].version[:2])) - python_args = ["--with-python=%s" % spec['python'].prefix, "--with-python-install-dir=%s" % site_packages_dir] + site_packages_dir = os.path.join(prefix, + 'lib/python%s/site-packages' + % (spec['python'].version.up_to(2))) + python_args = ["--with-python=%s" % spec['python'].prefix, + "--with-python-install-dir=%s" % site_packages_dir] else: python_args = ["--without-python"] -- cgit v1.2.3-60-g2f50 From 1b08296392e5413a8cbe33b0337f74cd59fec2e6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 11 Jul 2016 17:22:31 -0500 Subject: Fix flake8 error --- var/spack/repos/builtin/packages/libxml2/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index f5b65c1d24..360386669a 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -44,8 +44,8 @@ class Libxml2(Package): def install(self, spec, prefix): if '+python' in spec: site_packages_dir = os.path.join(prefix, - 'lib/python%s/site-packages' - % (spec['python'].version.up_to(2))) + 'lib/python%s/site-packages' % + (spec['python'].version.up_to(2))) python_args = ["--with-python=%s" % spec['python'].prefix, "--with-python-install-dir=%s" % site_packages_dir] else: -- cgit v1.2.3-60-g2f50