File: quilt.py

package info (click to toggle)
mpd 0.24.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,736 kB
  • sloc: cpp: 75,014; python: 1,408; xml: 628; perl: 469; java: 289; sh: 286; ansic: 235; makefile: 105
file content (12 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
import subprocess
from typing import Union

from .toolchain import AnyToolchain

def run_quilt(toolchain: AnyToolchain, cwd: str, patches_path: str, *args: str) -> None:
    env = dict(toolchain.env)
    env['QUILT_PATCHES'] = patches_path
    subprocess.check_call(['quilt'] + list(args), cwd=cwd, env=env)

def push_all(toolchain: AnyToolchain, src_path: str, patches_path: str) -> None:
    run_quilt(toolchain, src_path, patches_path, 'push', '-a')