@@ -156,6 +156,7 @@ class Config(Lockable):
debug_addrlist = False
debug_subseed = False
debug_tw = False
+ devtools = False
# rpc:
rpc_host = ''
@@ -303,6 +304,7 @@ class Config(Lockable):
'MMGEN_DEBUG_TW',
'MMGEN_DEBUG_UTF8',
'MMGEN_DEBUG_SUBSEED',
+ 'MMGEN_DEVTOOLS',
'MMGEN_FORCE_256_COLOR',
'MMGEN_HOLD_PROTECT_DISABLE',
'MMGEN_QUIET',
@@ -1 +1 @@
-14.0.dev4
+14.0.dev5
@@ -121,8 +121,9 @@ if exec_wrapper_os.getenv('MMGEN_TRACEMALLOC'):
exec_wrapper_tracemalloc_setup()
# import mmgen mods only after sys.path[0] is set to overlay root!
-from mmgen.devinit import init_dev as exec_wrapper_init_dev
-exec_wrapper_init_dev()
+if exec_wrapper_os.getenv('MMGEN_DEVTOOLS'):
+ from mmgen.devinit import init_dev as exec_wrapper_init_dev
+ exec_wrapper_init_dev()
exec_wrapper_tstart = exec_wrapper_time.time()
@@ -24,3 +24,7 @@ os.environ['PYTHONPATH'] = overlay_root
if 'TMUX' in os.environ:
del os.environ['TMUX']
+
+if os.getenv('MMGEN_DEVTOOLS'):
+ from mmgen.devinit import init_dev
+ init_dev()
@@ -24,8 +24,11 @@ import sys,os,re
import include.test_init
-from mmgen.devinit import init_dev
-init_dev()
+# for objtest, violate MMGen Project best practices and allow use of the dev tools
+# in production code:
+if not os.getenv('MMGEN_DEVTOOLS'):
# Import these _after_ local path's been added to sys.path
from mmgen.common import *
@@ -94,9 +94,6 @@ else:
-
from test.include.common import set_globals,test_py_log_fn,test_py_error_fn
try:
@@ -24,8 +24,11 @@ import sys,os,time,importlib,platform
+# for the unit tests, violate MMGen Project best practices and allow use of the dev tools
from test.include.common import set_globals,end_msg
@@ -5,7 +5,6 @@ test.unit_tests_d.ut_devtools: devtools unit tests for the MMGen suite
"""
import os,json
-from mmgen.devtools import *
from mmgen.util import msg
from . import unit_tests_base