From 1a1d2e074bf3c610e169aca484a6492617b4d64e Mon Sep 17 00:00:00 2001 From: Philipp A Date: Fri, 23 Oct 2020 11:00:09 +0200 Subject: [PATCH] Allow modules to stub themselves out --- flit_core/flit_core/common.py | 2 ++ 1 file changed, 2 insertions(+) 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): """