summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2015-11-16 11:30:35 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2015-11-16 11:30:35 -0500
commitca01adb50319970066ee62876a9b37481f7bbe22 (patch)
tree5e7614e8f1277845339f0b4554db2b79e86d3eab
parent8feaefadcfcae04ccaa204b93502e23158f7a7d4 (diff)
downloadspack-ca01adb50319970066ee62876a9b37481f7bbe22.tar.gz
spack-ca01adb50319970066ee62876a9b37481f7bbe22.tar.bz2
spack-ca01adb50319970066ee62876a9b37481f7bbe22.tar.xz
spack-ca01adb50319970066ee62876a9b37481f7bbe22.zip
libxml2: make the python dependency optional
Also turn it off by default since it is usually not necessary. Anything needing the Python bindings should declare it explicitly.
-rw-r--r--var/spack/packages/libxml2/package.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py
index df311bfaba..5d84fad22d 100644
--- a/var/spack/packages/libxml2/package.py
+++ b/var/spack/packages/libxml2/package.py
@@ -9,13 +9,20 @@ class Libxml2(Package):
version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788')
- extends('python')
+ variant('python', default=False, description='Enable Python support')
+
+ extends('python', when='+python')
depends_on('zlib')
depends_on('xz')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix,
- "--with-python=%s" % spec['python'].prefix)
+ if '+python' in spec:
+ python_arg = "--with-python=%s" % spec['python'].prefix
+ else:
+ python_arg = "--without-python"
+
+ configure("--prefix=%s" % prefix,
+ python_arg)
make()
make("install")