python/build/project.py: add quilt support

This commit is contained in:
Max Kellermann
2018-02-09 22:57:31 +01:00
parent 6ba918b203
commit 927071e085
2 changed files with 18 additions and 0 deletions

9
python/build/quilt.py Normal file
View File

@@ -0,0 +1,9 @@
import subprocess
def run_quilt(toolchain, cwd, patches_path, *args):
env = dict(toolchain.env)
env['QUILT_PATCHES'] = patches_path
subprocess.check_call(['quilt'] + list(args), cwd=cwd, env=env)
def push_all(toolchain, src_path, patches_path):
run_quilt(toolchain, src_path, patches_path, 'push', '-a')