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

DEBUG build error #38

Open
ConchFeng opened this issue Dec 30, 2024 · 1 comment
Open

DEBUG build error #38

ConchFeng opened this issue Dec 30, 2024 · 1 comment

Comments

@ConchFeng
Copy link

ConchFeng commented Dec 30, 2024

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.

@ConchFeng
Copy link
Author

BUT I do not know how to contributions py code, I love this project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant