mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-24 06:25:17 +08:00
Make compiler show more obvious messages
This commit is contained in:
parent
f1f3004171
commit
0c559872d8
1 changed files with 9 additions and 4 deletions
|
@ -100,7 +100,6 @@ def get_conf_dist_file(audience):
|
||||||
def have_nuitka_commercial():
|
def have_nuitka_commercial():
|
||||||
try:
|
try:
|
||||||
import nuitka.plugins.commercial
|
import nuitka.plugins.commercial
|
||||||
|
|
||||||
print("Running with nuitka commercial")
|
print("Running with nuitka commercial")
|
||||||
return True
|
return True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -120,7 +119,6 @@ def compile(arch, audience):
|
||||||
|
|
||||||
PACKAGE_DIR = "npbackup"
|
PACKAGE_DIR = "npbackup"
|
||||||
|
|
||||||
check_private_build(audience)
|
|
||||||
BUILDS_DIR = os.path.abspath(os.path.join(BASEDIR, os.pardir, "BUILDS"))
|
BUILDS_DIR = os.path.abspath(os.path.join(BASEDIR, os.pardir, "BUILDS"))
|
||||||
OUTPUT_DIR = os.path.join(BUILDS_DIR, audience, platform, arch)
|
OUTPUT_DIR = os.path.join(BUILDS_DIR, audience, platform, arch)
|
||||||
|
|
||||||
|
@ -145,7 +143,7 @@ def compile(arch, audience):
|
||||||
restic_source_file = get_restic_internal_binary(arch)
|
restic_source_file = get_restic_internal_binary(arch)
|
||||||
if not restic_source_file:
|
if not restic_source_file:
|
||||||
print("Cannot find restic source file.")
|
print("Cannot find restic source file.")
|
||||||
return
|
return False
|
||||||
restic_dest_file = os.path.join(PACKAGE_DIR, restic_executable)
|
restic_dest_file = os.path.join(PACKAGE_DIR, restic_executable)
|
||||||
|
|
||||||
translations_dir = "translations"
|
translations_dir = "translations"
|
||||||
|
@ -295,8 +293,15 @@ if __name__ == "__main__":
|
||||||
audiences = [args.audience]
|
audiences = [args.audience]
|
||||||
|
|
||||||
for audience in audiences:
|
for audience in audiences:
|
||||||
|
if audience not in AUDIENCES:
|
||||||
|
print("Bogus audience given")
|
||||||
|
sys.exit(4)
|
||||||
move_audience_files(audience)
|
move_audience_files(audience)
|
||||||
|
private_build = check_private_build(audience)
|
||||||
|
if private_build and audience != "private":
|
||||||
|
print("ERROR: Requested private build but no private data available")
|
||||||
|
continue
|
||||||
compile(arch=args.arch, audience=audience)
|
compile(arch=args.arch, audience=audience)
|
||||||
check_private_build(audience)
|
print("MADE {} build".format('PRIVATE' if private_build else 'PUBLIC'))
|
||||||
except Exception:
|
except Exception:
|
||||||
print("COMPILATION FAILED")
|
print("COMPILATION FAILED")
|
||||||
|
|
Loading…
Reference in a new issue