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.

21 lines
620 B

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Copyright 2017 LasLabs Inc.
  4. import os
  5. from doodbalib import CUSTOM_DIR, FILE_APT_BUILD
  6. from doodbalib.installer import INSTALLERS
  7. # Build-time dependencies must be removed when finishing build
  8. if os.path.isfile(FILE_APT_BUILD):
  9. installer = INSTALLERS["apt"](FILE_APT_BUILD)
  10. installer.remove()
  11. installer.cleanup()
  12. # Clean up garbage generated by respective package managers
  13. for name, class_ in INSTALLERS.items():
  14. req_file = os.path.join(CUSTOM_DIR, "dependencies", "%s.txt" % name)
  15. if os.path.isfile(req_file):
  16. class_(req_file).cleanup()