summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2016-07-11 16:56:26 -0500
committerGlenn Johnson <glenn-johnson@uiowa.edu>2016-07-11 16:56:26 -0500
commit8de84b5d8ab789a86b757e0a2e598aa88d4034df (patch)
treee3408f5798bddd831e0ec9f27ba0796bf9b28f5f
parent78ac11ff8892c859489e3b9c7c5efb17749e1bc8 (diff)
downloadspack-8de84b5d8ab789a86b757e0a2e598aa88d4034df.tar.gz
spack-8de84b5d8ab789a86b757e0a2e598aa88d4034df.tar.bz2
spack-8de84b5d8ab789a86b757e0a2e598aa88d4034df.tar.xz
spack-8de84b5d8ab789a86b757e0a2e598aa88d4034df.zip
Fix error reported on Google Groups list
Fixes the reported `TypeError: not enough arguments for format string` error.
-rw-r--r--var/spack/repos/builtin/packages/libxml2/package.py8
1 files changed, 6 insertions, 2 deletions
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"]