Correctly find the version of a dependency.

We have separated the version in two separated dicts since a long time :/
This commit is contained in:
Matthieu Gautier 2018-09-05 19:30:25 +02:00
parent a91d85fa41
commit df0b684869
2 changed files with 7 additions and 4 deletions

View File

@ -24,7 +24,10 @@ class Dependency(metaclass=_MetaDependency):
@classmethod @classmethod
def version(cls): def version(cls):
return base_deps_versions.get(cls.name, None) if cls.name in base_deps_versions:
return base_deps_versions[cls.name]
else:
return main_project_versions.get(cls.name, None)
@classmethod @classmethod
def full_name(cls): def full_name(cls):

View File

@ -359,9 +359,9 @@ if make_release and PLATFORM == 'native_dyn':
except FileExistsError: except FileExistsError:
pass pass
in_file = BASE_DIR/target/'meson-dist'/'{}-{}.tar.xz'.format( full_target_name = "{}-{}".format(target, main_project_versions[target])
target, in_file = BASE_DIR/full_target_name/'meson-dist'/'{}.tar.xz'.format(
main_project_versions[target]) full_target_name)
if in_file.exists(): if in_file.exists():
shutil.copy(str(in_file), str(out_dir/target)) shutil.copy(str(in_file), str(out_dir/target))
elif PLATFORM == 'native_static': elif PLATFORM == 'native_static':