From 9f9ee0c813443333a49c797083ff456629c009fb Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Tue, 11 Jun 2024 15:19:07 -0500 Subject: [PATCH] SCons: Add unobtrusive type hints in SCons files --- SConstruct | 1 + core/SCsub | 1 + core/config/SCsub | 1 + core/crypto/SCsub | 1 + core/debugger/SCsub | 1 + core/error/SCsub | 1 + core/extension/SCsub | 1 + core/input/SCsub | 1 + core/io/SCsub | 1 + core/math/SCsub | 1 + core/object/SCsub | 1 + core/os/SCsub | 1 + core/string/SCsub | 1 + core/templates/SCsub | 1 + core/variant/SCsub | 1 + drivers/SCsub | 1 + drivers/alsa/SCsub | 1 + drivers/alsamidi/SCsub | 1 + drivers/backtrace/SCsub | 1 + drivers/coreaudio/SCsub | 1 + drivers/coremidi/SCsub | 1 + drivers/d3d12/SCsub | 1 + drivers/egl/SCsub | 1 + drivers/gl_context/SCsub | 1 + drivers/gles3/SCsub | 1 + drivers/gles3/effects/SCsub | 1 + drivers/gles3/environment/SCsub | 1 + drivers/gles3/shaders/SCsub | 1 + drivers/gles3/shaders/effects/SCsub | 1 + drivers/gles3/storage/SCsub | 1 + drivers/metal/SCsub | 1 + drivers/png/SCsub | 1 + drivers/pulseaudio/SCsub | 1 + drivers/unix/SCsub | 1 + drivers/vulkan/SCsub | 1 + drivers/wasapi/SCsub | 1 + drivers/windows/SCsub | 1 + drivers/winmidi/SCsub | 1 + drivers/xaudio2/SCsub | 1 + editor/SCsub | 1 + editor/debugger/SCsub | 1 + editor/debugger/debug_adapter/SCsub | 1 + editor/export/SCsub | 1 + editor/gui/SCsub | 1 + editor/icons/SCsub | 1 + editor/import/SCsub | 1 + editor/plugins/SCsub | 1 + editor/plugins/gizmos/SCsub | 1 + editor/plugins/tiles/SCsub | 1 + editor/project_manager/SCsub | 1 + editor/themes/SCsub | 1 + main/SCsub | 1 + misc/utility/scons_hints.py | 98 +++++++++++++++++++ modules/SCsub | 1 + modules/astcenc/SCsub | 1 + modules/basis_universal/SCsub | 1 + modules/betsy/SCsub | 4 +- modules/bmp/SCsub | 1 + modules/camera/SCsub | 1 + modules/csg/SCsub | 1 + modules/cvtt/SCsub | 1 + modules/dds/SCsub | 1 + modules/enet/SCsub | 1 + modules/etcpak/SCsub | 1 + modules/fbx/SCsub | 1 + modules/freetype/SCsub | 1 + modules/gdscript/SCsub | 1 + .../gdscript/editor/script_templates/SCsub | 1 + modules/glslang/SCsub | 1 + modules/gltf/SCsub | 1 + modules/gltf/extensions/SCsub | 1 + modules/godot_physics_2d/SCsub | 3 +- modules/godot_physics_3d/SCsub | 3 +- modules/godot_physics_3d/joints/SCsub | 3 +- modules/gridmap/SCsub | 1 + modules/hdr/SCsub | 1 + modules/interactive_music/SCsub | 1 + modules/jpg/SCsub | 1 + modules/jsonrpc/SCsub | 1 + modules/ktx/SCsub | 1 + modules/lightmapper_rd/SCsub | 1 + modules/mbedtls/SCsub | 1 + modules/meshoptimizer/SCsub | 1 + modules/minimp3/SCsub | 1 + modules/mobile_vr/SCsub | 1 + modules/mono/SCsub | 1 + modules/mono/editor/script_templates/SCsub | 1 + modules/msdfgen/SCsub | 1 + modules/multiplayer/SCsub | 1 + modules/navigation/SCsub | 1 + modules/noise/SCsub | 1 + modules/ogg/SCsub | 1 + modules/openxr/SCsub | 1 + modules/openxr/action_map/SCsub | 1 + modules/openxr/editor/SCsub | 1 + modules/openxr/extensions/SCsub | 1 + modules/openxr/scene/SCsub | 1 + modules/raycast/SCsub | 1 + modules/regex/SCsub | 1 + modules/squish/SCsub | 1 + modules/svg/SCsub | 1 + modules/text_server_adv/SCsub | 1 + .../gdextension_build/SConstruct | 2 + modules/text_server_fb/SCsub | 1 + .../gdextension_build/SConstruct | 2 + modules/tga/SCsub | 1 + modules/theora/SCsub | 1 + modules/tinyexr/SCsub | 1 + modules/upnp/SCsub | 1 + modules/vhacd/SCsub | 1 + modules/vorbis/SCsub | 1 + modules/webp/SCsub | 1 + modules/webrtc/SCsub | 1 + modules/websocket/SCsub | 1 + modules/webxr/SCsub | 1 + modules/xatlas_unwrap/SCsub | 1 + modules/zip/SCsub | 1 + platform/SCsub | 1 + platform/android/SCsub | 1 + platform/ios/SCsub | 1 + platform/linuxbsd/SCsub | 1 + platform/linuxbsd/wayland/SCsub | 1 + platform/linuxbsd/x11/SCsub | 1 + platform/macos/SCsub | 1 + platform/web/SCsub | 1 + platform/windows/SCsub | 1 + pyproject.toml | 14 ++- scene/2d/SCsub | 1 + scene/2d/physics/SCsub | 1 + scene/2d/physics/joints/SCsub | 1 + scene/3d/SCsub | 1 + scene/3d/physics/SCsub | 1 + scene/3d/physics/joints/SCsub | 1 + scene/SCsub | 1 + scene/animation/SCsub | 1 + scene/audio/SCsub | 1 + scene/debugger/SCsub | 1 + scene/gui/SCsub | 1 + scene/main/SCsub | 1 + scene/resources/2d/SCsub | 1 + scene/resources/3d/SCsub | 1 + scene/resources/SCsub | 1 + scene/theme/SCsub | 1 + scene/theme/icons/SCsub | 1 + servers/SCsub | 1 + servers/audio/SCsub | 1 + servers/audio/effects/SCsub | 1 + servers/camera/SCsub | 1 + servers/debugger/SCsub | 1 + servers/display/SCsub | 1 + servers/extensions/SCsub | 1 + servers/movie_writer/SCsub | 1 + servers/navigation/SCsub | 1 + servers/rendering/SCsub | 1 + servers/rendering/dummy/SCsub | 1 + servers/rendering/dummy/storage/SCsub | 1 + servers/rendering/renderer_rd/SCsub | 1 + servers/rendering/renderer_rd/effects/SCsub | 1 + .../rendering/renderer_rd/environment/SCsub | 1 + .../renderer_rd/forward_clustered/SCsub | 1 + .../renderer_rd/forward_mobile/SCsub | 1 + servers/rendering/renderer_rd/shaders/SCsub | 1 + .../renderer_rd/shaders/effects/SCsub | 1 + .../renderer_rd/shaders/effects/fsr2/SCsub | 1 + .../renderer_rd/shaders/environment/SCsub | 1 + .../shaders/forward_clustered/SCsub | 1 + .../renderer_rd/shaders/forward_mobile/SCsub | 1 + .../rendering/renderer_rd/spirv-reflect/SCsub | 1 + .../rendering/renderer_rd/storage_rd/SCsub | 1 + servers/rendering/storage/SCsub | 1 + servers/text/SCsub | 1 + servers/xr/SCsub | 1 + tests/SCsub | 3 +- 173 files changed, 290 insertions(+), 6 deletions(-) create mode 100644 misc/utility/scons_hints.py diff --git a/SConstruct b/SConstruct index 0245531b45e..5566770148b 100644 --- a/SConstruct +++ b/SConstruct @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * EnsureSConsVersion(3, 1, 2) EnsurePythonVersion(3, 6) diff --git a/core/SCsub b/core/SCsub index c8267ae9600..8bda230b870 100644 --- a/core/SCsub +++ b/core/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/config/SCsub b/core/config/SCsub index bf702854905..1417a258c1a 100644 --- a/core/config/SCsub +++ b/core/config/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/crypto/SCsub b/core/crypto/SCsub index 8cff3cf679c..3cea6bfb471 100644 --- a/core/crypto/SCsub +++ b/core/crypto/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/debugger/SCsub b/core/debugger/SCsub index 19a65492252..ab811758940 100644 --- a/core/debugger/SCsub +++ b/core/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/error/SCsub b/core/error/SCsub index dfd6248a941..08089d31b07 100644 --- a/core/error/SCsub +++ b/core/error/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/extension/SCsub b/core/extension/SCsub index 6ab2d2b0a67..8688ca5b6e7 100644 --- a/core/extension/SCsub +++ b/core/extension/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/input/SCsub b/core/input/SCsub index d8e6f33156b..521f7702e4e 100644 --- a/core/input/SCsub +++ b/core/input/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/io/SCsub b/core/io/SCsub index 19a65492252..ab811758940 100644 --- a/core/io/SCsub +++ b/core/io/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/math/SCsub b/core/math/SCsub index c8fdac207ec..6ea3ab6b125 100644 --- a/core/math/SCsub +++ b/core/math/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/object/SCsub b/core/object/SCsub index 7c00bb719e3..3d0d2c14dd2 100644 --- a/core/object/SCsub +++ b/core/object/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/os/SCsub b/core/os/SCsub index 19a65492252..ab811758940 100644 --- a/core/os/SCsub +++ b/core/os/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/string/SCsub b/core/string/SCsub index 3217166f18d..b06e32eb88a 100644 --- a/core/string/SCsub +++ b/core/string/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/templates/SCsub b/core/templates/SCsub index 8c4c843a333..7f806d56099 100644 --- a/core/templates/SCsub +++ b/core/templates/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/variant/SCsub b/core/variant/SCsub index 7f4c8b7788b..8264503a229 100644 --- a/core/variant/SCsub +++ b/core/variant/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/SCsub b/drivers/SCsub index 44d29fb7c17..219c4451eef 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/alsa/SCsub b/drivers/alsa/SCsub index f17acb0f916..6242d0e359e 100644 --- a/drivers/alsa/SCsub +++ b/drivers/alsa/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/alsamidi/SCsub b/drivers/alsamidi/SCsub index 4e1b5f2a362..69d667c57bf 100644 --- a/drivers/alsamidi/SCsub +++ b/drivers/alsamidi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/backtrace/SCsub b/drivers/backtrace/SCsub index f61fb21581b..cc2cf0a6d8d 100644 --- a/drivers/backtrace/SCsub +++ b/drivers/backtrace/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/coreaudio/SCsub b/drivers/coreaudio/SCsub index 4e1b5f2a362..69d667c57bf 100644 --- a/drivers/coreaudio/SCsub +++ b/drivers/coreaudio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/coremidi/SCsub b/drivers/coremidi/SCsub index 4e1b5f2a362..69d667c57bf 100644 --- a/drivers/coremidi/SCsub +++ b/drivers/coremidi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/d3d12/SCsub b/drivers/d3d12/SCsub index 482a5491890..b6ceed23ac8 100644 --- a/drivers/d3d12/SCsub +++ b/drivers/d3d12/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import os from pathlib import Path diff --git a/drivers/egl/SCsub b/drivers/egl/SCsub index 1fd15b4bae6..3a9b484b830 100644 --- a/drivers/egl/SCsub +++ b/drivers/egl/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index ce6ea747b12..a2ba425990d 100644 --- a/drivers/gl_context/SCsub +++ b/drivers/gl_context/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/SCsub b/drivers/gles3/SCsub index 506312df805..4f4b33de03a 100644 --- a/drivers/gles3/SCsub +++ b/drivers/gles3/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/effects/SCsub b/drivers/gles3/effects/SCsub index 91e1140b750..9ad6234fbe4 100644 --- a/drivers/gles3/effects/SCsub +++ b/drivers/gles3/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/environment/SCsub b/drivers/gles3/environment/SCsub index 91e1140b750..9ad6234fbe4 100644 --- a/drivers/gles3/environment/SCsub +++ b/drivers/gles3/environment/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/shaders/SCsub b/drivers/gles3/shaders/SCsub index e70912cb4d7..df2c5150350 100644 --- a/drivers/gles3/shaders/SCsub +++ b/drivers/gles3/shaders/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/shaders/effects/SCsub b/drivers/gles3/shaders/effects/SCsub index 38b185ed885..387c317b90c 100644 --- a/drivers/gles3/shaders/effects/SCsub +++ b/drivers/gles3/shaders/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/storage/SCsub b/drivers/gles3/storage/SCsub index 91e1140b750..9ad6234fbe4 100644 --- a/drivers/gles3/storage/SCsub +++ b/drivers/gles3/storage/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/metal/SCsub b/drivers/metal/SCsub index 30129b78061..f597580763e 100644 --- a/drivers/metal/SCsub +++ b/drivers/metal/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/png/SCsub b/drivers/png/SCsub index e38f3c47606..fce37257b16 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/pulseaudio/SCsub b/drivers/pulseaudio/SCsub index f48489d7877..6a76ff6d85e 100644 --- a/drivers/pulseaudio/SCsub +++ b/drivers/pulseaudio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index 146563a3b61..bca4acfd740 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 1efef5ad774..6ea7cc9a3b9 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/wasapi/SCsub b/drivers/wasapi/SCsub index 4e1b5f2a362..69d667c57bf 100644 --- a/drivers/wasapi/SCsub +++ b/drivers/wasapi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/windows/SCsub b/drivers/windows/SCsub index 91e1140b750..9ad6234fbe4 100644 --- a/drivers/windows/SCsub +++ b/drivers/windows/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/winmidi/SCsub b/drivers/winmidi/SCsub index 4e1b5f2a362..69d667c57bf 100644 --- a/drivers/winmidi/SCsub +++ b/drivers/winmidi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/xaudio2/SCsub b/drivers/xaudio2/SCsub index 6778ad281e5..cd210466a2a 100644 --- a/drivers/xaudio2/SCsub +++ b/drivers/xaudio2/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/SCsub b/editor/SCsub index 029048969ad..9fcaf612457 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/debugger/SCsub b/editor/debugger/SCsub index 99f1c888f08..e26d09d88b1 100644 --- a/editor/debugger/SCsub +++ b/editor/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/debugger/debug_adapter/SCsub b/editor/debugger/debug_adapter/SCsub index 359d04e5df2..b3cff5b9dc6 100644 --- a/editor/debugger/debug_adapter/SCsub +++ b/editor/debugger/debug_adapter/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/export/SCsub b/editor/export/SCsub index 359d04e5df2..b3cff5b9dc6 100644 --- a/editor/export/SCsub +++ b/editor/export/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/gui/SCsub b/editor/gui/SCsub index 359d04e5df2..b3cff5b9dc6 100644 --- a/editor/gui/SCsub +++ b/editor/gui/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 0d9ac43c467..a66ef56699c 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/import/SCsub b/editor/import/SCsub index a8c06cc4069..3d3b7780ba3 100644 --- a/editor/import/SCsub +++ b/editor/import/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/plugins/SCsub b/editor/plugins/SCsub index 4b6abf18f94..2d3066c7c9e 100644 --- a/editor/plugins/SCsub +++ b/editor/plugins/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/plugins/gizmos/SCsub b/editor/plugins/gizmos/SCsub index 359d04e5df2..b3cff5b9dc6 100644 --- a/editor/plugins/gizmos/SCsub +++ b/editor/plugins/gizmos/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/plugins/tiles/SCsub b/editor/plugins/tiles/SCsub index 359d04e5df2..b3cff5b9dc6 100644 --- a/editor/plugins/tiles/SCsub +++ b/editor/plugins/tiles/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/project_manager/SCsub b/editor/project_manager/SCsub index 359d04e5df2..b3cff5b9dc6 100644 --- a/editor/project_manager/SCsub +++ b/editor/project_manager/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/themes/SCsub b/editor/themes/SCsub index e8f96e42994..5a9949dfa76 100644 --- a/editor/themes/SCsub +++ b/editor/themes/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/main/SCsub b/main/SCsub index f3807167a2a..71bee465f59 100644 --- a/main/SCsub +++ b/main/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/misc/utility/scons_hints.py b/misc/utility/scons_hints.py new file mode 100644 index 00000000000..fe380e399da --- /dev/null +++ b/misc/utility/scons_hints.py @@ -0,0 +1,98 @@ +""" +Adds type hints to SCons scripts. Implemented via +`from misc.utility.scons_hints import *`. + +This is NOT a 1-1 representation of what the defines will represent in an +SCons build, as proxies are almost always utilized instead. Rather, this is +a means of tracing back what those proxies are calling to in the first place. +""" + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # ruff: noqa: F401 + from SCons.Action import Action + from SCons.Builder import Builder + from SCons.Defaults import Chmod, Copy, CScan, DefaultEnvironment, Delete, DirScanner, Mkdir, Move, Touch + from SCons.Environment import Base + from SCons.Platform import Platform + from SCons.Platform.virtualenv import Virtualenv + from SCons.Scanner import FindPathDirs, ScannerBase + from SCons.Script import ARGLIST, ARGUMENTS, BUILD_TARGETS, COMMAND_LINE_TARGETS, DEFAULT_TARGETS + from SCons.Script.Main import ( + AddOption, + BuildTask, + CleanTask, + DebugOptions, + GetBuildFailures, + GetOption, + PrintHelp, + Progress, + QuestionTask, + SetOption, + ValidateOptions, + ) + from SCons.Script.SConscript import Configure, Return, SConsEnvironment, call_stack + from SCons.Script.SConscript import SConsEnvironment as Environment + from SCons.Subst import SetAllowableExceptions as AllowSubstExceptions + from SCons.Tool import CScanner, DScanner, ProgramScanner, SourceFileScanner, Tool + from SCons.Util import AddMethod, WhereIs + from SCons.Variables import BoolVariable, EnumVariable, ListVariable, PackageVariable, PathVariable, Variables + + # Global functions + GetSConsVersion = SConsEnvironment.GetSConsVersion + EnsurePythonVersion = SConsEnvironment.EnsurePythonVersion + EnsureSConsVersion = SConsEnvironment.EnsureSConsVersion + Exit = SConsEnvironment.Exit + GetLaunchDir = SConsEnvironment.GetLaunchDir + SConscriptChdir = SConsEnvironment.SConscriptChdir + + # SConsEnvironment functions + Default = SConsEnvironment(DefaultEnvironment()).Default + Export = SConsEnvironment(DefaultEnvironment()).Export + Help = SConsEnvironment(DefaultEnvironment()).Help + Import = SConsEnvironment(DefaultEnvironment()).Import + SConscript = SConsEnvironment(DefaultEnvironment()).SConscript + + # Environment functions + AddPostAction = DefaultEnvironment().AddPostAction + AddPreAction = DefaultEnvironment().AddPreAction + Alias = DefaultEnvironment().Alias + AlwaysBuild = DefaultEnvironment().AlwaysBuild + CacheDir = DefaultEnvironment().CacheDir + Clean = DefaultEnvironment().Clean + Command = DefaultEnvironment().Command + Decider = DefaultEnvironment().Decider + Depends = DefaultEnvironment().Depends + Dir = DefaultEnvironment().Dir + Entry = DefaultEnvironment().Entry + Execute = DefaultEnvironment().Execute + File = DefaultEnvironment().File + FindFile = DefaultEnvironment().FindFile + FindInstalledFiles = DefaultEnvironment().FindInstalledFiles + FindSourceFiles = DefaultEnvironment().FindSourceFiles + Flatten = DefaultEnvironment().Flatten + GetBuildPath = DefaultEnvironment().GetBuildPath + Glob = DefaultEnvironment().Glob + Ignore = DefaultEnvironment().Ignore + Install = DefaultEnvironment().Install + InstallAs = DefaultEnvironment().InstallAs + InstallVersionedLib = DefaultEnvironment().InstallVersionedLib + Literal = DefaultEnvironment().Literal + Local = DefaultEnvironment().Local + NoCache = DefaultEnvironment().NoCache + NoClean = DefaultEnvironment().NoClean + ParseDepends = DefaultEnvironment().ParseDepends + Precious = DefaultEnvironment().Precious + PyPackageDir = DefaultEnvironment().PyPackageDir + Repository = DefaultEnvironment().Repository + Requires = DefaultEnvironment().Requires + SConsignFile = DefaultEnvironment().SConsignFile + SideEffect = DefaultEnvironment().SideEffect + Split = DefaultEnvironment().Split + Tag = DefaultEnvironment().Tag + Value = DefaultEnvironment().Value + VariantDir = DefaultEnvironment().VariantDir + + env: SConsEnvironment + env_modules: SConsEnvironment diff --git a/modules/SCsub b/modules/SCsub index e16cc17b672..fea2f2eeb86 100644 --- a/modules/SCsub +++ b/modules/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import os diff --git a/modules/astcenc/SCsub b/modules/astcenc/SCsub index 691c74b4a74..23e9fa87fc1 100644 --- a/modules/astcenc/SCsub +++ b/modules/astcenc/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/basis_universal/SCsub b/modules/basis_universal/SCsub index 80bfd7e858e..0142317e1ef 100644 --- a/modules/basis_universal/SCsub +++ b/modules/basis_universal/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/betsy/SCsub b/modules/betsy/SCsub index ed5dcbf58b7..2735116cc37 100644 --- a/modules/betsy/SCsub +++ b/modules/betsy/SCsub @@ -1,4 +1,6 @@ -# !/ usr / bin / env python +#!/usr/bin/env python +from misc.utility.scons_hints import * + Import("env") Import("env_modules") diff --git a/modules/bmp/SCsub b/modules/bmp/SCsub index 9d317887c3d..cc3684b94bb 100644 --- a/modules/bmp/SCsub +++ b/modules/bmp/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/camera/SCsub b/modules/camera/SCsub index ba7fca8794a..aed5efd0d20 100644 --- a/modules/camera/SCsub +++ b/modules/camera/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/csg/SCsub b/modules/csg/SCsub index 1cf9974fc13..f71618ab221 100644 --- a/modules/csg/SCsub +++ b/modules/csg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/cvtt/SCsub b/modules/cvtt/SCsub index 1d5a7ff6a3b..44e56ab6a77 100644 --- a/modules/cvtt/SCsub +++ b/modules/cvtt/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/dds/SCsub b/modules/dds/SCsub index 06980bd670f..d1c67c31eae 100644 --- a/modules/dds/SCsub +++ b/modules/dds/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/enet/SCsub b/modules/enet/SCsub index 580e5a3eb02..0c31638e46b 100644 --- a/modules/enet/SCsub +++ b/modules/enet/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/etcpak/SCsub b/modules/etcpak/SCsub index 2d3b69be75f..a872e1cd03a 100644 --- a/modules/etcpak/SCsub +++ b/modules/etcpak/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/fbx/SCsub b/modules/fbx/SCsub index 6a791094c61..6f9fbba0b46 100644 --- a/modules/fbx/SCsub +++ b/modules/fbx/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub index 2813eaecd51..5edce966800 100644 --- a/modules/freetype/SCsub +++ b/modules/freetype/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gdscript/SCsub b/modules/gdscript/SCsub index 61accd4fc9a..8f50bf9588e 100644 --- a/modules/gdscript/SCsub +++ b/modules/gdscript/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gdscript/editor/script_templates/SCsub b/modules/gdscript/editor/script_templates/SCsub index 5db7e3fc3ba..28a27db3fae 100644 --- a/modules/gdscript/editor/script_templates/SCsub +++ b/modules/gdscript/editor/script_templates/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub index 3068377e60a..b6e3da2316c 100644 --- a/modules/glslang/SCsub +++ b/modules/glslang/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gltf/SCsub b/modules/gltf/SCsub index 9d263cccacd..10751168636 100644 --- a/modules/gltf/SCsub +++ b/modules/gltf/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gltf/extensions/SCsub b/modules/gltf/extensions/SCsub index fdf14300f17..e403cd6fdc0 100644 --- a/modules/gltf/extensions/SCsub +++ b/modules/gltf/extensions/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/godot_physics_2d/SCsub b/modules/godot_physics_2d/SCsub index 5d93da5ecf6..39eb469978e 100644 --- a/modules/godot_physics_2d/SCsub +++ b/modules/godot_physics_2d/SCsub @@ -1,5 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * -Import('env') +Import("env") env.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/godot_physics_3d/SCsub b/modules/godot_physics_3d/SCsub index 41a59cd24ec..1502eb39eea 100644 --- a/modules/godot_physics_3d/SCsub +++ b/modules/godot_physics_3d/SCsub @@ -1,6 +1,7 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * -Import('env') +Import("env") env.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/godot_physics_3d/joints/SCsub b/modules/godot_physics_3d/joints/SCsub index 5d93da5ecf6..39eb469978e 100644 --- a/modules/godot_physics_3d/joints/SCsub +++ b/modules/godot_physics_3d/joints/SCsub @@ -1,5 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * -Import('env') +Import("env") env.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/gridmap/SCsub b/modules/gridmap/SCsub index 282d7725929..d4baa9000e6 100644 --- a/modules/gridmap/SCsub +++ b/modules/gridmap/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/hdr/SCsub b/modules/hdr/SCsub index 10629bda3c6..739b2caecf2 100644 --- a/modules/hdr/SCsub +++ b/modules/hdr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/interactive_music/SCsub b/modules/interactive_music/SCsub index 2950a30854a..f2546747a0f 100644 --- a/modules/interactive_music/SCsub +++ b/modules/interactive_music/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/jpg/SCsub b/modules/jpg/SCsub index b840542c1bb..2d948d33554 100644 --- a/modules/jpg/SCsub +++ b/modules/jpg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/jsonrpc/SCsub b/modules/jsonrpc/SCsub index 8ee4f8bfea9..923567b1388 100644 --- a/modules/jsonrpc/SCsub +++ b/modules/jsonrpc/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/ktx/SCsub b/modules/ktx/SCsub index c4cb7324988..f4c394d7345 100644 --- a/modules/ktx/SCsub +++ b/modules/ktx/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/lightmapper_rd/SCsub b/modules/lightmapper_rd/SCsub index fe9737b36f6..157381ae98b 100644 --- a/modules/lightmapper_rd/SCsub +++ b/modules/lightmapper_rd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/mbedtls/SCsub b/modules/mbedtls/SCsub index 90ce98c751c..e217ca5ca47 100644 --- a/modules/mbedtls/SCsub +++ b/modules/mbedtls/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/meshoptimizer/SCsub b/modules/meshoptimizer/SCsub index 3f86bb4f000..b335b5db3aa 100644 --- a/modules/meshoptimizer/SCsub +++ b/modules/meshoptimizer/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/minimp3/SCsub b/modules/minimp3/SCsub index 09e84f71e98..e9491bb72ff 100644 --- a/modules/minimp3/SCsub +++ b/modules/minimp3/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/mobile_vr/SCsub b/modules/mobile_vr/SCsub index e6c43228b4c..b237f312094 100644 --- a/modules/mobile_vr/SCsub +++ b/modules/mobile_vr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/mono/SCsub b/modules/mono/SCsub index d267df938a0..f74f0fb9c14 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import build_scripts.mono_configure as mono_configure diff --git a/modules/mono/editor/script_templates/SCsub b/modules/mono/editor/script_templates/SCsub index 01c293c25db..f465374758a 100644 --- a/modules/mono/editor/script_templates/SCsub +++ b/modules/mono/editor/script_templates/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/modules/msdfgen/SCsub b/modules/msdfgen/SCsub index f4316a74e78..844b0980ac5 100644 --- a/modules/msdfgen/SCsub +++ b/modules/msdfgen/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/multiplayer/SCsub b/modules/multiplayer/SCsub index e89038c3e0e..97f91c56744 100644 --- a/modules/multiplayer/SCsub +++ b/modules/multiplayer/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/navigation/SCsub b/modules/navigation/SCsub index 02d3b7487e9..ab578252c19 100644 --- a/modules/navigation/SCsub +++ b/modules/navigation/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/noise/SCsub b/modules/noise/SCsub index f309fd2dd44..dcf51b03e3e 100644 --- a/modules/noise/SCsub +++ b/modules/noise/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub index f15525648f7..fabd4f936ac 100644 --- a/modules/ogg/SCsub +++ b/modules/ogg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/openxr/SCsub b/modules/openxr/SCsub index 77922045ebb..dd6a9214402 100644 --- a/modules/openxr/SCsub +++ b/modules/openxr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/openxr/action_map/SCsub b/modules/openxr/action_map/SCsub index 7a493011ec8..d659be1d99b 100644 --- a/modules/openxr/action_map/SCsub +++ b/modules/openxr/action_map/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_openxr") diff --git a/modules/openxr/editor/SCsub b/modules/openxr/editor/SCsub index ccf67a80d06..39eb469978e 100644 --- a/modules/openxr/editor/SCsub +++ b/modules/openxr/editor/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/modules/openxr/extensions/SCsub b/modules/openxr/extensions/SCsub index 1bd9cfaa229..95b75ccd652 100644 --- a/modules/openxr/extensions/SCsub +++ b/modules/openxr/extensions/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_openxr") diff --git a/modules/openxr/scene/SCsub b/modules/openxr/scene/SCsub index 7a493011ec8..d659be1d99b 100644 --- a/modules/openxr/scene/SCsub +++ b/modules/openxr/scene/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_openxr") diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub index f3a8e307630..bbf5ff79839 100644 --- a/modules/raycast/SCsub +++ b/modules/raycast/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/regex/SCsub b/modules/regex/SCsub index f5e2dd5dfcb..5d70604e764 100644 --- a/modules/regex/SCsub +++ b/modules/regex/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/squish/SCsub b/modules/squish/SCsub index c9e29911d85..d8e7fbc142b 100644 --- a/modules/squish/SCsub +++ b/modules/squish/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/svg/SCsub b/modules/svg/SCsub index a32be0e41a4..af8f6c14f4e 100644 --- a/modules/svg/SCsub +++ b/modules/svg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub index 4112b81622f..304a09515c6 100644 --- a/modules/text_server_adv/SCsub +++ b/modules/text_server_adv/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/text_server_adv/gdextension_build/SConstruct b/modules/text_server_adv/gdextension_build/SConstruct index effed1e7724..8f4f2cba409 100644 --- a/modules/text_server_adv/gdextension_build/SConstruct +++ b/modules/text_server_adv/gdextension_build/SConstruct @@ -1,4 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * + import atexit import sys import time diff --git a/modules/text_server_fb/SCsub b/modules/text_server_fb/SCsub index fc0a8727c61..b56df192c25 100644 --- a/modules/text_server_fb/SCsub +++ b/modules/text_server_fb/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/text_server_fb/gdextension_build/SConstruct b/modules/text_server_fb/gdextension_build/SConstruct index a3c20520404..dc849d58149 100644 --- a/modules/text_server_fb/gdextension_build/SConstruct +++ b/modules/text_server_fb/gdextension_build/SConstruct @@ -1,4 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * + import atexit import sys import time diff --git a/modules/tga/SCsub b/modules/tga/SCsub index ccd7d2ee375..c7f58e87f78 100644 --- a/modules/tga/SCsub +++ b/modules/tga/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/theora/SCsub b/modules/theora/SCsub index ca666050ddc..be557c1c24c 100644 --- a/modules/theora/SCsub +++ b/modules/theora/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/tinyexr/SCsub b/modules/tinyexr/SCsub index bf9242cc169..434e99bf84d 100644 --- a/modules/tinyexr/SCsub +++ b/modules/tinyexr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/upnp/SCsub b/modules/upnp/SCsub index 98c03e9ee90..6657d75caee 100644 --- a/modules/upnp/SCsub +++ b/modules/upnp/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/vhacd/SCsub b/modules/vhacd/SCsub index 1ff4122114e..926cc5b16f4 100644 --- a/modules/vhacd/SCsub +++ b/modules/vhacd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub index 322314487f5..f063d97fee7 100644 --- a/modules/vorbis/SCsub +++ b/modules/vorbis/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/webp/SCsub b/modules/webp/SCsub index dde4450c232..a939e2f90e7 100644 --- a/modules/webp/SCsub +++ b/modules/webp/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/webrtc/SCsub b/modules/webrtc/SCsub index e315633f55b..0c5f2c9dda4 100644 --- a/modules/webrtc/SCsub +++ b/modules/webrtc/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub index 8b469fe5be7..acaa0d3cebe 100644 --- a/modules/websocket/SCsub +++ b/modules/websocket/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/webxr/SCsub b/modules/webxr/SCsub index 81caa4a2790..9fe4e03ea64 100644 --- a/modules/webxr/SCsub +++ b/modules/webxr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/xatlas_unwrap/SCsub b/modules/xatlas_unwrap/SCsub index aa6bdaea334..ae82a53bd91 100644 --- a/modules/xatlas_unwrap/SCsub +++ b/modules/xatlas_unwrap/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/zip/SCsub b/modules/zip/SCsub index b7710123fd6..0bab3ff5f9a 100644 --- a/modules/zip/SCsub +++ b/modules/zip/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/platform/SCsub b/platform/SCsub index cdaa6074baf..7c9d07f6efd 100644 --- a/platform/SCsub +++ b/platform/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * from glob import glob from pathlib import Path diff --git a/platform/android/SCsub b/platform/android/SCsub index 8c88b419b33..3bc89593519 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import subprocess import sys diff --git a/platform/ios/SCsub b/platform/ios/SCsub index cff7dcc1fd1..959a657aacc 100644 --- a/platform/ios/SCsub +++ b/platform/ios/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub index 0802b528f4b..4def765e9c5 100644 --- a/platform/linuxbsd/SCsub +++ b/platform/linuxbsd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/linuxbsd/wayland/SCsub b/platform/linuxbsd/wayland/SCsub index 89b586845ce..1a8e243728b 100644 --- a/platform/linuxbsd/wayland/SCsub +++ b/platform/linuxbsd/wayland/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/linuxbsd/x11/SCsub b/platform/linuxbsd/x11/SCsub index 75fe584ad58..b76b98447f9 100644 --- a/platform/linuxbsd/x11/SCsub +++ b/platform/linuxbsd/x11/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/macos/SCsub b/platform/macos/SCsub index a10262c524e..3924e79fb69 100644 --- a/platform/macos/SCsub +++ b/platform/macos/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/web/SCsub b/platform/web/SCsub index e81f2ec5160..b30bf20f26c 100644 --- a/platform/web/SCsub +++ b/platform/web/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * from methods import print_error diff --git a/platform/windows/SCsub b/platform/windows/SCsub index f8ed8b73f58..1d17e7b3251 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/pyproject.toml b/pyproject.toml index 78c8d8c20ed..a4bfd278161 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,19 @@ extend-select = [ [tool.ruff.lint.per-file-ignores] "{SConstruct,SCsub}" = [ "E402", # Module level import not at top of file - "F821", # Undefined name + "F403", # Undefined local with import star + "F405", # Undefined local with import star usage +] + +[tool.ruff.lint.isort] +sections = { metadata = ["misc.utility.scons_hints"] } +section-order = [ + "future", + "metadata", + "standard-library", + "third-party", + "first-party", + "local-folder", ] [tool.codespell] diff --git a/scene/2d/SCsub b/scene/2d/SCsub index 94e1ab6c967..6f6bf9818cc 100644 --- a/scene/2d/SCsub +++ b/scene/2d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/2d/physics/SCsub b/scene/2d/physics/SCsub index e7fd3fe6435..5f9747514a0 100644 --- a/scene/2d/physics/SCsub +++ b/scene/2d/physics/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/2d/physics/joints/SCsub b/scene/2d/physics/joints/SCsub index fc61250247d..374dc2119dc 100644 --- a/scene/2d/physics/joints/SCsub +++ b/scene/2d/physics/joints/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/3d/SCsub b/scene/3d/SCsub index 94e1ab6c967..6f6bf9818cc 100644 --- a/scene/3d/SCsub +++ b/scene/3d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/3d/physics/SCsub b/scene/3d/physics/SCsub index e7fd3fe6435..5f9747514a0 100644 --- a/scene/3d/physics/SCsub +++ b/scene/3d/physics/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/3d/physics/joints/SCsub b/scene/3d/physics/joints/SCsub index fc61250247d..374dc2119dc 100644 --- a/scene/3d/physics/joints/SCsub +++ b/scene/3d/physics/joints/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/SCsub b/scene/SCsub index b4b2d6dd0a4..1eb4ffa53d1 100644 --- a/scene/SCsub +++ b/scene/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/animation/SCsub b/scene/animation/SCsub index d0aa0bc8aa6..dd2b22c2e33 100644 --- a/scene/animation/SCsub +++ b/scene/animation/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/audio/SCsub b/scene/audio/SCsub index fc61250247d..374dc2119dc 100644 --- a/scene/audio/SCsub +++ b/scene/audio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/debugger/SCsub b/scene/debugger/SCsub index fc61250247d..374dc2119dc 100644 --- a/scene/debugger/SCsub +++ b/scene/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/gui/SCsub b/scene/gui/SCsub index fc61250247d..374dc2119dc 100644 --- a/scene/gui/SCsub +++ b/scene/gui/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/main/SCsub b/scene/main/SCsub index fc61250247d..374dc2119dc 100644 --- a/scene/main/SCsub +++ b/scene/main/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/resources/2d/SCsub b/scene/resources/2d/SCsub index fdf20e0bde3..408aa3cf7e6 100644 --- a/scene/resources/2d/SCsub +++ b/scene/resources/2d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/resources/3d/SCsub b/scene/resources/3d/SCsub index fdf20e0bde3..408aa3cf7e6 100644 --- a/scene/resources/3d/SCsub +++ b/scene/resources/3d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/resources/SCsub b/scene/resources/SCsub index 2b6aa88d2c0..46f6251b913 100644 --- a/scene/resources/SCsub +++ b/scene/resources/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/theme/SCsub b/scene/theme/SCsub index 2372d1820a5..fb0914c0ee1 100644 --- a/scene/theme/SCsub +++ b/scene/theme/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/theme/icons/SCsub b/scene/theme/icons/SCsub index 1f3b7f6d178..19aca74e57c 100644 --- a/scene/theme/icons/SCsub +++ b/scene/theme/icons/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/SCsub b/servers/SCsub index 28180a7bb27..7abe53b9e17 100644 --- a/servers/SCsub +++ b/servers/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/audio/SCsub b/servers/audio/SCsub index 5021e578c36..7d293c628df 100644 --- a/servers/audio/SCsub +++ b/servers/audio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/audio/effects/SCsub b/servers/audio/effects/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/audio/effects/SCsub +++ b/servers/audio/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/camera/SCsub b/servers/camera/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/camera/SCsub +++ b/servers/camera/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/debugger/SCsub b/servers/debugger/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/debugger/SCsub +++ b/servers/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/display/SCsub b/servers/display/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/display/SCsub +++ b/servers/display/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/extensions/SCsub b/servers/extensions/SCsub index 95c7f5d3196..e7bb57e9f3f 100644 --- a/servers/extensions/SCsub +++ b/servers/extensions/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/movie_writer/SCsub b/servers/movie_writer/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/movie_writer/SCsub +++ b/servers/movie_writer/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/navigation/SCsub b/servers/navigation/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/navigation/SCsub +++ b/servers/navigation/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/SCsub b/servers/rendering/SCsub index cf26ca029d1..99717618180 100644 --- a/servers/rendering/SCsub +++ b/servers/rendering/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/dummy/SCsub b/servers/rendering/dummy/SCsub index aa688af6cda..3e1f338227e 100644 --- a/servers/rendering/dummy/SCsub +++ b/servers/rendering/dummy/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/dummy/storage/SCsub b/servers/rendering/dummy/storage/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/rendering/dummy/storage/SCsub +++ b/servers/rendering/dummy/storage/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/SCsub b/servers/rendering/renderer_rd/SCsub index a27439e9315..c6d9e3ef36b 100644 --- a/servers/rendering/renderer_rd/SCsub +++ b/servers/rendering/renderer_rd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/effects/SCsub b/servers/rendering/renderer_rd/effects/SCsub index 8e13715447c..9f330c9f0f6 100644 --- a/servers/rendering/renderer_rd/effects/SCsub +++ b/servers/rendering/renderer_rd/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/environment/SCsub b/servers/rendering/renderer_rd/environment/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/rendering/renderer_rd/environment/SCsub +++ b/servers/rendering/renderer_rd/environment/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/forward_clustered/SCsub b/servers/rendering/renderer_rd/forward_clustered/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/rendering/renderer_rd/forward_clustered/SCsub +++ b/servers/rendering/renderer_rd/forward_clustered/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/forward_mobile/SCsub b/servers/rendering/renderer_rd/forward_mobile/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/rendering/renderer_rd/forward_mobile/SCsub +++ b/servers/rendering/renderer_rd/forward_mobile/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/SCsub b/servers/rendering/renderer_rd/shaders/SCsub index 5405985741b..e102b839b59 100644 --- a/servers/rendering/renderer_rd/shaders/SCsub +++ b/servers/rendering/renderer_rd/shaders/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/effects/SCsub b/servers/rendering/renderer_rd/shaders/effects/SCsub index 810f781340c..e5517e52eba 100644 --- a/servers/rendering/renderer_rd/shaders/effects/SCsub +++ b/servers/rendering/renderer_rd/shaders/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub b/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub index 5b8bbc343b7..53f3ee39775 100644 --- a/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub +++ b/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/environment/SCsub b/servers/rendering/renderer_rd/shaders/environment/SCsub index f06a2d86e24..2c3e7d39ef2 100644 --- a/servers/rendering/renderer_rd/shaders/environment/SCsub +++ b/servers/rendering/renderer_rd/shaders/environment/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub b/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub index f06a2d86e24..2c3e7d39ef2 100644 --- a/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub +++ b/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub b/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub index f06a2d86e24..2c3e7d39ef2 100644 --- a/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub +++ b/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/spirv-reflect/SCsub b/servers/rendering/renderer_rd/spirv-reflect/SCsub index 4c27e5bef77..8d3d8560a59 100644 --- a/servers/rendering/renderer_rd/spirv-reflect/SCsub +++ b/servers/rendering/renderer_rd/spirv-reflect/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/storage_rd/SCsub b/servers/rendering/renderer_rd/storage_rd/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/rendering/renderer_rd/storage_rd/SCsub +++ b/servers/rendering/renderer_rd/storage_rd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/storage/SCsub b/servers/rendering/storage/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/rendering/storage/SCsub +++ b/servers/rendering/storage/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/text/SCsub b/servers/text/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/text/SCsub +++ b/servers/text/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/xr/SCsub b/servers/xr/SCsub index 86681f9c74d..98f918b2458 100644 --- a/servers/xr/SCsub +++ b/servers/xr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/tests/SCsub b/tests/SCsub index d96a1142e4d..169c7c1efa8 100644 --- a/tests/SCsub +++ b/tests/SCsub @@ -1,4 +1,5 @@ -#!/usr/bin/python +#!/usr/bin/env python +from misc.utility.scons_hints import * Import("env")