You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
988 B

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
from glob import glob
from os.path import basename, join, splitext
from doodbalib import CUSTOM_DIR, FILE_APT_BUILD, SRC_DIR
from doodbalib.installer import INSTALLERS, install, logger
# Build dependencies installed before any others
install("apt", FILE_APT_BUILD)
for name in INSTALLERS:
req_files = []
# Normal dependency installation
req_files.append(join(CUSTOM_DIR, "dependencies", "%s.txt" % name))
for req_file in req_files:
install(name, req_file)
# Sorted dependencies installation
dep_files = sorted(glob(join(CUSTOM_DIR, "dependencies", "[0-9]*-*")))
for dep_file in dep_files:
root, ext = splitext(basename(dep_file))
# Get the installer (xxx-installer[-description][.ext])
installer = root.split("-", 2)[1]
if installer not in INSTALLERS:
logger.error("Unknown installer: %s", installer)
raise Exception
install(installer, dep_file)