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

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

@thatbirdguythatuknownot
Copy link
Contributor Author

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

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

@thatbirdguythatuknownot
Copy link
Contributor Author

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

@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 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 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 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
@terryjreedy terryjreedy changed the title bpo-45816: Support building with VS 2022 gh-89974: Support building with VS 2022 Jun 23, 2022
@zooba zooba added the needs backport to 3.10 only security fixes label Jun 23, 2022
@miss-islington
Copy link
Contributor

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

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jun 23, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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 pull request 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.

6 participants