diff --git a/flit_core/flit_core/common.py b/flit_core/flit_core/common.py index b0505911..e02c233a 100644 --- a/flit_core/flit_core/common.py +++ b/flit_core/flit_core/common.py @@ -112,10 +112,12 @@ def _module_load_ctx(): - Handlers on the root logger. """ logging_handlers = logging.root.handlers[:] + os.environ["FLIT_GETTING_VERSION"] = "1" try: yield finally: logging.root.handlers = logging_handlers + del os.environ["FLIT_GETTING_VERSION"] def get_docstring_and_version_via_ast(target): """