Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft tools: change relative imports to top-level absolute imports #4431

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
registry query that returns a path that does not exist. Multiple invocation
paths were not prepared to handle the MissingConfiguration exception. The
MissingConfiguration exception type was removed.
- The MSCommon module import was changed from a relative import to a top-level
absolute import in the following Microsoft tools: midl, mslib, mslink, mssdk, msvc,
msvs. Moving any of these tools that used relative imports to the scons site tools
folder would fail on import (i.e., the relative import paths become invalid when
moved).

From Vitaly Cheptsov:
- Fix race condition in `Mkdir` which can happen when two `SConscript`
Expand Down
5 changes: 5 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ IMPROVEMENTS
------------

- Now tries to find mingw if it comes from Chocolatey install of msys2.
- MSVC: Module imports were changed from a relative import to a top-level
absolute import in the following Microsoft tools: midl, mslib, mslink, mssdk, msvc,
msvs. Moving any of these tools that used relative imports to the scons site tools
folder would fail on import (i.e., the relative import paths become invalid when
moved).

PACKAGING
---------
Expand Down
2 changes: 1 addition & 1 deletion SCons/Tool/midl.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import SCons.Scanner.IDL
import SCons.Util

from .MSCommon import msvc_setup_env_tool
from SCons.Tool.MSCommon import msvc_setup_env_tool

tool_name = 'midl'

Expand Down
5 changes: 4 additions & 1 deletion SCons/Tool/mslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
import SCons.Tool.msvc
import SCons.Util

from .MSCommon import msvc_setup_env_tool, msvc_setup_env_once
from SCons.Tool.MSCommon import (
msvc_setup_env_tool,
msvc_setup_env_once,
)

tool_name = 'mslib'

Expand Down
7 changes: 5 additions & 2 deletions SCons/Tool/mslink.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@
import SCons.Tool.msvs
import SCons.Util

from .MSCommon import msvc_setup_env_once, msvc_setup_env_tool
from .MSCommon.common import get_pch_node
from SCons.Tool.MSCommon import (
msvc_setup_env_once,
msvc_setup_env_tool,
)
from SCons.Tool.MSCommon.common import get_pch_node

tool_name = 'mslink'

Expand Down
6 changes: 4 additions & 2 deletions SCons/Tool/mssdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
selection method.
"""

from .MSCommon import mssdk_exists, \
mssdk_setup_env
from SCons.Tool.MSCommon import (
mssdk_exists,
mssdk_setup_env,
)

def generate(env) -> None:
"""Add construction variables for an MS SDK to an Environment."""
Expand Down
9 changes: 7 additions & 2 deletions SCons/Tool/msvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@
import SCons.Warnings
import SCons.Scanner.RC

from .MSCommon import msvc_setup_env_tool, msvc_setup_env_once, msvc_version_to_maj_min, msvc_find_vswhere
from .MSCommon.common import get_pch_node
from SCons.Tool.MSCommon import (
msvc_setup_env_tool,
msvc_setup_env_once,
msvc_version_to_maj_min,
msvc_find_vswhere,
)
from SCons.Tool.MSCommon.common import get_pch_node

tool_name = 'msvc'

Expand Down
5 changes: 4 additions & 1 deletion SCons/Tool/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
import SCons.Warnings
from SCons.Defaults import processDefines
from SCons.compat import PICKLE_PROTOCOL
from .MSCommon import msvc_setup_env_tool, msvc_setup_env_once
from SCons.Tool.MSCommon import (
msvc_setup_env_tool,
msvc_setup_env_once,
)

tool_name = 'msvs'

Expand Down
Loading