Move dependencies declaration of a target into the builder.

This is the builder that depends on other target, not the target itself.
This commit is contained in:
Matthieu Gautier
2018-05-28 11:44:54 +02:00
parent 7e0b403ccc
commit 115fbfa147
14 changed files with 72 additions and 63 deletions

View File

@ -8,23 +8,21 @@ from kiwixbuild._global import neutralEnv
class AllBaseDependencies(Dependency):
name = "alldependencies"
@property
def dependencies(self):
base_deps = ['zlib', 'lzma', 'xapian-core', 'gumbo', 'pugixml', 'libmicrohttpd', 'libaria2']
if self.buildEnv.platform_info.build != 'native':
base_deps += ["icu4c_cross-compile"]
if self.buildEnv.platform_info.build != 'win32':
base_deps += ["libmagic_cross-compile"]
else:
base_deps += ["icu4c", "libmagic"]
if ( self.buildEnv.platform_info.build != 'android'
and neutralEnv('distname') != 'Darwin'):
base_deps += ['ctpp2c', 'ctpp2']
if self.buildEnv.platform_info.build == 'android':
base_deps += ['Gradle']
return base_deps
Source = NoopSource
Builder = NoopBuilder
class Builder(NoopBuilder):
@classmethod
def get_dependencies(cls, platformInfo):
base_deps = ['zlib', 'lzma', 'xapian-core', 'gumbo', 'pugixml', 'libmicrohttpd', 'libaria2']
if platformInfo.build != 'native':
base_deps += ["icu4c_cross-compile"]
if platformInfo.build != 'win32':
base_deps += ["libmagic_cross-compile"]
else:
base_deps += ["icu4c", "libmagic"]
if (platformInfo.build != 'android' and
neutralEnv('distname') != 'Darwin'):
base_deps += ['ctpp2c', 'ctpp2']
if platformInfo.build == 'android':
base_deps += ['Gradle']
return base_deps