install python files to libxml2 prefix instead of python prefix and ignore non-python files when activating
This commit is contained in:
parent
f6eb000381
commit
3163d016db
1 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
from spack import *
|
||||
import os
|
||||
|
||||
class Libxml2(Package):
|
||||
"""Libxml2 is the XML C parser and toolkit developed for the Gnome
|
||||
|
@ -11,18 +12,19 @@ class Libxml2(Package):
|
|||
|
||||
variant('python', default=False, description='Enable Python support')
|
||||
|
||||
extends('python', when='+python')
|
||||
extends('python', when='+python', ignore=r'(bin.*$)|(include.*$)|(share.*$)|(lib/libxml2.*$)|(lib/xml2.*$)|(lib/cmake.*$)')
|
||||
depends_on('zlib')
|
||||
depends_on('xz')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
if '+python' in spec:
|
||||
python_arg = "--with-python=%s" % spec['python'].prefix
|
||||
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]
|
||||
else:
|
||||
python_arg = "--without-python"
|
||||
python_args = ["--without-python"]
|
||||
|
||||
configure("--prefix=%s" % prefix,
|
||||
python_arg)
|
||||
*python_args)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
|
Loading…
Reference in a new issue