fix cycle dependency in libxml+python (#13847)

* fix cycle dependency in libxml+python
* comment why we need these dependencies
This commit is contained in:
Greg Becker 2020-01-29 12:39:55 -08:00 committed by GitHub
parent da189b8d1d
commit bd60e0f137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -27,7 +27,8 @@ class Libxml2(AutotoolsPackage):
depends_on('zlib')
depends_on('xz')
depends_on('python+shared', when='+python')
# avoid cycle dependency for concretizer
depends_on('python+shared~libxml2', when='+python')
extends('python', when='+python',
ignore=r'(bin.*$)|(include.*$)|(share.*$)|(lib/libxml2.*$)|'
'(lib/xml2.*$)|(lib/cmake.*$)')

View File

@ -70,6 +70,10 @@ class Python(AutotoolsPackage):
extendable = True
# Variants to avoid cyclical dependencies for concretizer
variant('libxml2', default=False,
description='Use a gettext library build with libxml2')
variant(
'debug', default=False,
description="debug build with extra checks (this is high overhead)"
@ -116,7 +120,8 @@ class Python(AutotoolsPackage):
variant('tix', default=False, description='Build Tix module')
depends_on('pkgconfig@0.9.0:', type='build')
depends_on('gettext')
depends_on('gettext +libxml2', when='+libxml2')
depends_on('gettext ~libxml2', when='~libxml2')
# Optional dependencies
# See detect_modules() in setup.py for details