From 654360d2ad2395519360cb275519d0c4bdddd945 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 19 Dec 2018 11:38:14 -0600 Subject: Add missing libiconv dependency to libxml2 (#10148) --- .../repos/builtin/packages/libxml2/package.py | 23 +++++++++++++++++----- 1 file 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') -- cgit v1.2.3-70-g09d2