summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGregory L. Lee <lee218@cab687.llnl.gov>2015-12-09 14:10:05 -0800
committerGregory L. Lee <lee218@cab687.llnl.gov>2015-12-09 14:10:05 -0800
commit3163d016db3849c3c9e801c1cdb9e6e907afa313 (patch)
tree2cc151994024b4f871c0d7576121544541b0ab88 /var
parentf6eb0003818d5d421e778fe86c108fe8c9ad2eab (diff)
downloadspack-3163d016db3849c3c9e801c1cdb9e6e907afa313.tar.gz
spack-3163d016db3849c3c9e801c1cdb9e6e907afa313.tar.bz2
spack-3163d016db3849c3c9e801c1cdb9e6e907afa313.tar.xz
spack-3163d016db3849c3c9e801c1cdb9e6e907afa313.zip
install python files to libxml2 prefix instead of python prefix and ignore non-python files when activating
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/libxml2/package.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py
index 5d84fad22d..134e596963 100644
--- a/var/spack/packages/libxml2/package.py
+++ b/var/spack/packages/libxml2/package.py
@@ -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")