Debian Codegraph @

tests/utils.py

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 # SPDX-FileCopyrightText: 2021-present Ofek Lev <[email protected]>
2 #
3 # SPDX-License-Identifier: MIT
4 import subprocess
5 import sys
6
7
8 def build_project(*args):
9 if not args:
10 args = ['-w']
11
12 process = subprocess.run([sys.executable, '-m', 'build', *args], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
13 if process.returncode: # no cov
14 raise Exception(process.stdout.decode('utf-8'))