Cleanup: run autopep8 on build_files/
Replace multiple hashes with over-lines for make_source_archive.py.
This commit is contained in:
parent
972a697f82
commit
df3316cbe9
@ -114,7 +114,6 @@ def makefile_log() -> List[str]:
|
||||
print("Can't execute process")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
while process.poll():
|
||||
time.sleep(1)
|
||||
|
||||
@ -228,7 +227,7 @@ def build_defines_as_args() -> List[str]:
|
||||
def queue_processes(
|
||||
process_funcs: Sequence[Tuple[Callable[..., subprocess.Popen[Any]], Tuple[Any, ...]]],
|
||||
*,
|
||||
job_total: int =-1,
|
||||
job_total: int = -1,
|
||||
sleep: float = 0.1,
|
||||
) -> None:
|
||||
""" Takes a list of function arg pairs, each function must return a process
|
||||
|
@ -143,8 +143,8 @@ def packages_path(current_directory: Path, cli_args: Any) -> Optional[Path]:
|
||||
|
||||
return Path(relpath)
|
||||
|
||||
|
||||
### Manifest creation
|
||||
# -----------------------------------------------------------------------------
|
||||
# Manifest creation
|
||||
|
||||
|
||||
def create_manifest(
|
||||
@ -195,7 +195,8 @@ def packages_to_manifest(outfile: TextIO, packages_dir: Path) -> None:
|
||||
print(path, file=outfile)
|
||||
|
||||
|
||||
### Higher-level functions
|
||||
# -----------------------------------------------------------------------------
|
||||
# Higher-level functions
|
||||
|
||||
|
||||
def create_tarball(
|
||||
@ -249,7 +250,8 @@ def cleanup(manifest: Path) -> None:
|
||||
print("OK")
|
||||
|
||||
|
||||
## Low-level commands
|
||||
# -----------------------------------------------------------------------------
|
||||
# Low-level commands
|
||||
|
||||
|
||||
def git_ls_files(directory: Path = Path(".")) -> Iterable[Path]:
|
||||
@ -265,7 +267,7 @@ def git_ls_files(directory: Path = Path(".")) -> Iterable[Path]:
|
||||
yield path
|
||||
|
||||
|
||||
def git_command(*cli_args: Union[bytes, str, Path] ) -> Iterable[str]:
|
||||
def git_command(*cli_args: Union[bytes, str, Path]) -> Iterable[str]:
|
||||
"""Generator, yields lines of output from a Git command."""
|
||||
command = ("git", *cli_args)
|
||||
|
||||
|
@ -129,6 +129,7 @@ def svn_update(args, release_version):
|
||||
call(svn_non_interactive + ["switch", svn_url + dirname, dirpath], exit_on_error=False)
|
||||
call(svn_non_interactive + ["update", dirpath])
|
||||
|
||||
|
||||
# Test if git repo can be updated.
|
||||
def git_update_skip(args, check_remote_exists=True):
|
||||
if make_utils.command_missing(args.git_command):
|
||||
|
@ -47,8 +47,10 @@ def check_output(cmd, exit_on_error=True):
|
||||
|
||||
|
||||
def git_branch_exists(git_command, branch):
|
||||
return call([git_command, "rev-parse", "--verify", branch], exit_on_error=False, silent=True) == 0 or \
|
||||
return (
|
||||
call([git_command, "rev-parse", "--verify", branch], exit_on_error=False, silent=True) == 0 or
|
||||
call([git_command, "rev-parse", "--verify", "remotes/origin/" + branch], exit_on_error=False, silent=True) == 0
|
||||
)
|
||||
|
||||
|
||||
def git_branch(git_command):
|
||||
|
Loading…
Reference in New Issue
Block a user