Skip to content

DEBUG build error #38

@ConchFeng

Description

@ConchFeng

Code Refactor
Here's how you can refactor the code to determine the Python version based on the build mode:

            # Figure out what version of Python we just built:
            major, minor = self.get_python_version(
                os.path.join("PCBuild", path, "python_d.exe")
            ).split(".")

change to

            # Figure out what version of Python we just built:
            mode_paths = {
                BuildMode.RELEASE: os.path.join("PCBuild", path, "python.exe"),
                BuildMode.DEBUG: os.path.join("PCBuild", path, "python_d.exe")
            }
            major, minor = self.get_python_version(
                mode_paths[self.mode]
            ).split(".")

Description:

In the build_python function within compile_all.py, we need to ensure that the correct Python executable is used based on the build mode. Specifically, the debug build should utilize the python_d.exe executable, while the release build should use the standard python.exe.

Impact:

This change will ensure that the correct Python executable is used for both release and debug builds, preventing potential issues related to using the wrong executable in different build configurations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions