HubertGaczykRep/projekt/venv/lib/python3.10/site-packages/setuptools/_distutils/py35compat.py

20 lines
455 B
Python
Raw Normal View History

2024-01-12 13:32:14 +01:00
import sys
import subprocess
def __optim_args_from_interpreter_flags():
"""Return a list of command-line arguments reproducing the current
optimization settings in sys.flags."""
args = []
value = sys.flags.optimize
if value > 0:
args.append("-" + "O" * value)
return args
_optim_args_from_interpreter_flags = getattr(
subprocess,
"_optim_args_from_interpreter_flags",
__optim_args_from_interpreter_flags,
)