mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-10 15:04:55 +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():
|
||||
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
|
||||
try:
|
||||
import PRIVATE._private_secret_keys
|
||||
|
@ -516,12 +520,10 @@ if __name__ == "__main__":
|
|||
private_build = check_private_build()
|
||||
if private_build and audience != "private":
|
||||
print("ERROR: Requested public build but private data available")
|
||||
errors = True
|
||||
continue
|
||||
sys.exit(1)
|
||||
elif not private_build and audience != "public":
|
||||
print("ERROR: Requested private build but no private data available")
|
||||
errors = True
|
||||
continue
|
||||
sys.exit(1)
|
||||
for build_type in build_types:
|
||||
result = compile(
|
||||
arch=python_arch(),
|
||||
|
|
Loading…
Add table
Reference in a new issue