mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-11 15:34:57 +08:00
Update compiler detection of private/public builds
This commit is contained in:
parent
e7f7fb7fc5
commit
eb5390f2bb
1 changed files with 6 additions and 4 deletions
|
@ -97,6 +97,10 @@ def get_metadata(package_file):
|
||||||
|
|
||||||
|
|
||||||
def check_private_build():
|
def check_private_build():
|
||||||
|
if "PRIVATE._private_secret_keys" in sys.modules.keys():
|
||||||
|
sys.modules.pop("PRIVATE._private_secret_keys")
|
||||||
|
if "PRIVATE._obfuscation" in sys.modules.keys():
|
||||||
|
sys.modules.pop("PRIVATE._obfuscation")
|
||||||
private = None
|
private = None
|
||||||
try:
|
try:
|
||||||
import PRIVATE._private_secret_keys
|
import PRIVATE._private_secret_keys
|
||||||
|
@ -516,12 +520,10 @@ if __name__ == "__main__":
|
||||||
private_build = check_private_build()
|
private_build = check_private_build()
|
||||||
if private_build and audience != "private":
|
if private_build and audience != "private":
|
||||||
print("ERROR: Requested public build but private data available")
|
print("ERROR: Requested public build but private data available")
|
||||||
errors = True
|
sys.exit(1)
|
||||||
continue
|
|
||||||
elif not private_build and audience != "public":
|
elif not private_build and audience != "public":
|
||||||
print("ERROR: Requested private build but no private data available")
|
print("ERROR: Requested private build but no private data available")
|
||||||
errors = True
|
sys.exit(1)
|
||||||
continue
|
|
||||||
for build_type in build_types:
|
for build_type in build_types:
|
||||||
result = compile(
|
result = compile(
|
||||||
arch=python_arch(),
|
arch=python_arch(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue