Handle stacktrace with binary launch with wrong python version

main
mpgn 2023-01-04 11:48:52 -05:00
parent 2c6b982f7f
commit 83f8ffd006
2 changed files with 10 additions and 4 deletions

View File

@ -19,9 +19,9 @@ from shiv.cli import __version__ as VERSION
def build_cme():
print("building CME")
try:
shutil.rmtree("build")
shutil.rmtree("bin")
except:
shutil.rmtree("build")
except Exception as e:
pass
try:
@ -55,7 +55,7 @@ def build_cme():
create_archive(
[Path("build").absolute()],
Path("bin/cme"),
"/usr/bin/env -S python3 -sE",
"/usr/bin/env -S python -sE",
"_bootstrap:bootstrap",
env,
True,
@ -76,7 +76,7 @@ def build_cmedb():
create_archive(
[Path("build").absolute()],
Path("bin/cmedb"),
"/usr/bin/env -S python3 -sE",
"/usr/bin/env -S python -sE",
"_bootstrap:bootstrap",
env,
True,

View File

@ -34,6 +34,12 @@ import logging
setup_logger()
logger = CMEAdapter()
try:
import librlers
except:
print("Incompatible python version, try with another python version or another binary 3.8 / 3.9 / 3.10 / 3.11 that match your python version (python -V)")
sys.exit()
async def monitor_threadpool(pool, targets):
logging.debug('Started thread poller')