diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libxml2/package.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index eb2409ebf2..04da5342bd 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -21,18 +21,24 @@ class Libxml2(AutotoolsPackage): variant('python', default=False, description='Enable Python support') - extends('python', when='+python', - ignore=r'(bin.*$)|(include.*$)|(share.*$)|(lib/libxml2.*$)|' - '(lib/xml2.*$)|(lib/cmake.*$)') + depends_on('pkgconfig@0.9.0:', type='build') + depends_on('libiconv') depends_on('zlib') depends_on('xz') - depends_on('pkgconfig', type='build') + extends('python+shared', when='+python', + ignore=r'(bin.*$)|(include.*$)|(share.*$)|(lib/libxml2.*$)|' + '(lib/xml2.*$)|(lib/cmake.*$)') + + # XML Conformance Test Suites + # See http://www.w3.org/XML/Test/ for information + resource(name='xmlts', url='http://www.w3.org/XML/Test/xmlts20080827.tar.gz', + sha256='96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7') def configure_args(self): spec = self.spec - args = ["--with-lzma=%s" % spec['xz'].prefix] + args = ['--with-lzma={0}'.format(spec['xz'].prefix)] if '+python' in spec: args.extend([ @@ -47,3 +53,10 @@ class Libxml2(AutotoolsPackage): def setup_dependent_environment(self, spack_env, run_env, dependent_spec): spack_env.prepend_path('CPATH', self.prefix.include.libxml2) run_env.prepend_path('CPATH', self.prefix.include.libxml2) + + @run_after('install') + @on_package_attributes(run_tests=True) + def import_module_test(self): + if '+python' in self.spec: + with working_dir('spack-test', create=True): + python('-c', 'import libxml2') |