Split out build system.

This commit is contained in:
Jelmer Vernooij 2021-02-06 14:59:49 +00:00
parent 7919d42f05
commit 69ae73b960
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8
3 changed files with 44 additions and 8 deletions

View file

@ -33,6 +33,7 @@ from breezy.workingtree import WorkingTree
from breezy.plugins.debian.repack_tarball import get_filetype
from . import apt, DetailedFailure, shebang_binary
from .buildsystem import detect_buildsystems
from .session import run_with_tee, Session
from .session.schroot import SchrootSession
from .debian.fix_build import (
@ -141,10 +142,6 @@ def run_with_build_fixer(session: Session, args: List[str]):
fixed_errors.append(error)
class NoBuildToolsFound(Exception):
"""No supported build tools were found."""
def run_dist(session):
apt.install(session, ['git'])
@ -152,6 +149,10 @@ def run_dist(session):
# e.g. pip caches in ~/.cache
session.create_home()
for buildsystem in detect_buildsystems(session):
buildsystem.dist()
return
if os.path.exists('package.xml'):
apt.install(session, ['php-pear', 'php-horde-core'])
logging.info('Found package.xml, assuming pear package.')