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

gh-89974: Support building with VS 2022 #29577

Merged
merged 12 commits into from Dec 3, 2021

Conversation

thatbirdguythatuknownot
Copy link
Contributor

@thatbirdguythatuknownot thatbirdguythatuknownot commented Nov 16, 2021

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Nov 30, 2021

cc @zooba I verified this, with this python can be compiled on VS 2022 without retargeting solution.

@thatbirdguythatuknownot
Copy link
Contributor Author

@thatbirdguythatuknownot thatbirdguythatuknownot commented Nov 30, 2021

cc @zooba I verified this, with this python can be compiled on VS 2022 without retargeting solution.

How was it verified? In this case, MSBuild v143 must be downloaded and installed without any of the v142 components installed with it, or else it would naturally work because v142 is available.

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Nov 30, 2021

I only have v143 installed and it worked without any changes hence verified.

@thatbirdguythatuknownot
Copy link
Contributor Author

@thatbirdguythatuknownot thatbirdguythatuknownot commented Nov 30, 2021

I only have v143 installed and it worked without any changes hence verified.

@kumaraditya303 Alright, I'm verifying that; hold on.

@thatbirdguythatuknownot
Copy link
Contributor Author

@thatbirdguythatuknownot thatbirdguythatuknownot commented Nov 30, 2021

@kumaraditya303 No it does not work:

Using py -3.10 (found 3.10 with py.exe)
Fetching external libraries...
bzip2-1.0.6 already exists, skipping.
sqlite-3.36.0.0 already exists, skipping.
xz-5.2.2 already exists, skipping.
zlib-1.2.11 already exists, skipping.
Fetching external binaries...
libffi-3.4.2 already exists, skipping.
openssl-bin-1.1.1l already exists, skipping.
tcltk-8.6.12.0 already exists, skipping.
Finished.
Cannot find Git on PATH
Using "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" (found in the PATH)
Using py -3.10 (found 3.10 with py.exe)

C:\Windows\system32>"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" "C:\Users\server\Desktop\cpython-main\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Release /p:Platform=x64 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker=
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(436
,5): error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v142') cannot be found. To build using
the v142 build tools, please install Visual Studio 2019 build tools. Alternatively, you may upgrade to the current Vis
ual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:
\Users\server\Desktop\cpython-main\PCbuild_freeze_module.vcxproj]

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Nov 30, 2021

Apparently it was working for me locally, the windows team would verify it anyway, I am not a Visual Studio expert maybe I did something wrong, I use vscode and was compiling without errors, anyways Thanks

@zooba
Copy link
Member

@zooba zooba commented Dec 2, 2021

We also need the change I mentioned in this post: https://bugs.python.org/issue45816#msg406635

Otherwise official release builds will break, and it'll cause annoying delays and nasty churn in the git history when we discover it too late ;)

@thatbirdguythatuknownot
Copy link
Contributor Author

@thatbirdguythatuknownot thatbirdguythatuknownot commented Dec 3, 2021

We also need the change I mentioned in this post: https://bugs.python.org/issue45816#msg406635

Otherwise official release builds will break, and it'll cause annoying delays and nasty churn in the git history when we discover it too late ;)

@zooba Added as part of the pull request.

@zooba zooba merged commit d930170 into python:main Dec 3, 2021
14 checks passed
@terryjreedy terryjreedy changed the title bpo-45816: Support building with VS 2022 gh-89974: Support building with VS 2022 Jun 23, 2022
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 23, 2022

Thanks @thatbirdguythatuknownot for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 23, 2022

GH-94189 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 23, 2022
…ythonGH-29577)

(cherry picked from commit d930170)

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
miss-islington added a commit that referenced this issue Jun 23, 2022
…H-29577)

(cherry picked from commit d930170)

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

None yet

6 participants