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.
This commit is contained in:
parent
8feaefadcf
commit
ca01adb503
@ -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):
|
||||
if '+python' in spec:
|
||||
python_arg = "--with-python=%s" % spec['python'].prefix
|
||||
else:
|
||||
python_arg = "--without-python"
|
||||
|
||||
configure("--prefix=%s" % prefix,
|
||||
"--with-python=%s" % spec['python'].prefix)
|
||||
python_arg)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
Loading…
Reference in New Issue
Block a user