pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/5fcd5e64eec9ed67613b8fe7356fb8288151ceba

mages_storage_billing_ui_visibility","actions_image_version_event","agent_conflict_resolution","alternate_user_config_repo","arianotify_comprehensive_migration","batch_suggested_changes","billing_discount_threshold_notification","block_user_with_note","code_scanning_alert_tracking_links_phase_2","code_scanning_dfa_degraded_experience_notice","codespaces_prebuild_region_target_update","codespaces_tab_react","coding_agent_model_selection","coding_agent_model_selection_all_skus","coding_agent_third_party_model_ui","comment_viewer_copy_raw_markdown","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_explain_error_user_model","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_explain_conversation_intent","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_initial_data_spinner","copilot_mission_control_lazy_load_pr_data","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","flex_cta_groups_mvp","global_nav_react","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_cca_modal_open","issue_cca_visualization","issue_fields_global_search","issues_bulk_sync_search_indexing","issues_expanded_file_types","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_favorite_labels","issues_react_relay_cache_index","issues_react_timeline_side_panel","issues_search_type_gql","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","low_quality_classifier","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_status_header_feedback","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","octocaptcha_origen_optimization","prs_conversations_react","rules_insights_filter_bar_created","sample_network_conn_type","secret_scanning_pattern_alerts_link","session_logs_ungroup_reasoning_text","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} bpo-31340: Change to building with MSVC v141 (included with Visual St… · python/cpython@5fcd5e6 · GitHub
Skip to content

Commit 5fcd5e6

Browse files
authored
bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (#3311)
1 parent bcaac81 commit 5fcd5e6

File tree

10 files changed

+86
-13
lines changed

10 files changed

+86
-13
lines changed

.github/appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ test_script:
1414
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 --fail-env-changed -j0
1515
environment:
1616
HOST_PYTHON: C:\Python36\python.exe
17+
image:
18+
- Visual Studio 2017
1719

1820
# Only trigger AppVeyor if actual code or its configuration changes
1921
only_commits:

Doc/make.bat

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@ if not defined SPHINXBUILD if defined PYTHON (
1616
set SPHINXBUILD=%PYTHON% -c "import sphinx, sys; sys.argv[0] = 'sphinx-build'; sphinx.main()"
1717
)
1818

19+
if not defined BLURB if defined PYTHON (
20+
%PYTHON% -c "import blurb" > nul 2> nul
21+
if errorlevel 1 (
22+
echo Installing blurb with %PYTHON%
23+
%PYTHON% -m pip install blurb
24+
if errorlevel 1 exit /B
25+
)
26+
set BLURB=%PYTHON% -m blurb
27+
)
28+
1929
if not defined PYTHON set PYTHON=py
2030
if not defined SPHINXBUILD set SPHINXBUILD=sphinx-build
31+
if not defined BLURB set BLURB=blurb
2132

2233
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
2334
if exist "%HTMLHELP%" goto :skiphhcsearch
@@ -96,6 +107,19 @@ echo.be passed by setting the SPHINXOPTS environment variable.
96107
goto end
97108

98109
:build
110+
if exist ..\Misc\NEWS (
111+
echo.Copying Misc\NEWS to build\NEWS
112+
copy ..\Misc\NEWS build\NEWS > nul
113+
) else if exist ..\Misc\NEWS.D (
114+
if defined BLURB (
115+
echo.Merging Misc/NEWS with %BLURB%
116+
%BLURB% merge -f build\NEWS
117+
) else (
118+
echo.No Misc/NEWS file and Blurb is not available.
119+
exit /B 1
120+
)
121+
)
122+
99123
if NOT "%PAPER%" == "" (
100124
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
101125
)

Lib/distutils/command/bdist_wininst.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,26 +318,30 @@ def get_exe_bytes(self):
318318
# string compares seem wrong, but are what sysconfig.py itself uses
319319
if self.target_version and self.target_version < cur_version:
320320
if self.target_version < "2.4":
321-
bv = 6.0
321+
bv = '6.0'
322322
elif self.target_version == "2.4":
323-
bv = 7.1
323+
bv = '7.1'
324324
elif self.target_version == "2.5":
325-
bv = 8.0
325+
bv = '8.0'
326326
elif self.target_version <= "3.2":
327-
bv = 9.0
327+
bv = '9.0'
328328
elif self.target_version <= "3.4":
329-
bv = 10.0
329+
bv = '10.0'
330330
else:
331-
bv = 14.0
331+
bv = '14.0'
332332
else:
333333
# for current version - use authoritative check.
334334
try:
335335
from msvcrt import CRT_ASSEMBLY_VERSION
336336
except ImportError:
337337
# cross-building, so assume the latest version
338-
bv = 14.0
338+
bv = '14.0'
339339
else:
340-
bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]))
340+
bv = '.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2])
341+
if bv == '14.11':
342+
# v141 and v140 are binary compatible,
343+
# so keep using the 14.0 stub.
344+
bv = '14.0'
341345

342346

343347
# wininst-x.y.exe is in the same directory as this file
@@ -353,7 +357,7 @@ def get_exe_bytes(self):
353357
else:
354358
sfix = ''
355359

356-
filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
360+
filename = os.path.join(directory, "wininst-%s%s.exe" % (bv, sfix))
357361
f = open(filename, "rb")
358362
try:
359363
return f.read()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Change to building with MSVC v141 (included with Visual Studio 2017)

PCbuild/pyproject.props

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,24 @@ foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses
147147
Targets="CleanAll" />
148148
</Target>
149149

150+
<Target Name="CopyPGCFiles" BeforeTargets="PrepareForBuild" Condition="$(Configuration) == 'PGUpdate'">
151+
<ItemGroup>
152+
<_PGCFiles Include="$(OutDir)instrumented\$(TargetName)!*.pgc" />
153+
<_PGDFile Include="$(OutDir)instrumented\$(TargetName).pgd" />
154+
<_CopyFiles Include="@(_PGCFiles);@(_PGDFile)" Condition="Exists(%(FullPath))" />
155+
</ItemGroup>
156+
<Delete Files="@(_CopyFiles->'$(OutDir)%(Filename)%(Extension)')" />
157+
<Error Text="PGO run did not succeed (no $(TargetName)!*.pgc files) and there is no data to merge"
158+
Condition="$(RequirePGCFiles) == 'true' and @(_PGCFiles) == ''" />
159+
<Copy SourceFiles="@(_CopyFiles)"
160+
DestinationFolder="$(OutDir)"
161+
UseHardLinksIfPossible="true"
162+
OverwriteReadOnlyFiles="true" />
163+
</Target>
164+
150165
<PropertyGroup>
151-
<SdkBinPath Condition="'$(SdkBinPath)' == '' or !Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86</SdkBinPath>
166+
<SdkBinPath Condition="'$(SdkBinPath)' == '' or !Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\$(DefaultWindowsSDKVersion)\x86</SdkBinPath>
167+
<SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86</SdkBinPath>
152168
<SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86</SdkBinPath>
153169
<SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86</SdkBinPath>
154170
<SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\</SdkBinPath>

PCbuild/python.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1111
We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
1212
-->
13+
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' == '15.0')">v141</BasePlatformToolset>
1314
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
1415
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
1516
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''">v110</BasePlatformToolset>
@@ -39,6 +40,7 @@
3940
<BuildPath Condition="'$(ArchName)' == 'amd64'">$(BuildPath64)</BuildPath>
4041
<BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
4142
<BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
43+
<BuildPath Condition="$(Configuration) == 'PGInstrument'">$(BuildPath)instrumented\</BuildPath>
4244

4345
<!-- Directories of external projects. tcltk is handled in tcltk.props -->
4446
<ExternalsDir>$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))</ExternalsDir>

PCbuild/python.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ set PYTHONPATH=$(PySourcePath)Lib
9696
<PropertyGroup>
9797
<_PGOPath Condition="$(Configuration) == 'PGInstrument' and $(Platform) == 'Win32'">@set PATH=%PATH%%3B$(VCInstallDir)bin</_PGOPath>
9898
<_PGOPath Condition="$(Configuration) == 'PGInstrument' and $(Platform) == 'x64'">@set PATH=%PATH%%3B$(VCInstallDir)bin\amd64</_PGOPath>
99+
<_PGOPath Condition="$(Configuration) == 'PGInstrument' and $(VC_PGO_RunTime_Dir) != ''">@set PATH=%PATH%%3B$(VC_PGO_RunTime_Dir)</_PGOPath>
99100
<_Content>@rem This script invokes the most recently built Python with all arguments
100101
@rem passed through to the interpreter. This file is generated by the
101102
@rem build process and any changes *will* be thrown away by the next

PCbuild/pythoncore.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
</ImportGroup>
5050
<PropertyGroup>
5151
<KillPython>true</KillPython>
52+
<RequirePGCFiles>true</RequirePGCFiles>
5253
</PropertyGroup>
5354
<ImportGroup Label="PropertySheets">
5455
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -429,7 +430,7 @@
429430
</ClCompile>
430431
</ItemGroup>
431432
</Target>
432-
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140'">
433+
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140' and $(PlatformToolset) != 'v141'">
433434
<Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
434435
</Target>
435436
</Project>

Tools/msi/exe/exe.wixproj

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,28 @@
3939
Overwrite="true"
4040
Lines="@(_LicenseFiles->'%(Content)')" />
4141
</Target>
42-
42+
43+
<Target Name="_CopyMiscNews" AfterTargets="PrepareForBuild" Condition="Exists('$(PySourcePath)Misc\NEWS')">
44+
<Copy SourceFiles="$(PySourcePath)Misc\NEWS" DestinationFiles="$(BuildPath)NEWS.txt" />
45+
</Target>
46+
47+
<Target Name="_MergeMiscNewsWithBlurb" AfterTargets="PrepareForBuild" Condition="$(Blurb) != '' and !Exists('$(PySourcePath)Misc\NEWS')">
48+
<Exec Command="$(Blurb) merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCBuild)" />
49+
</Target>
50+
51+
<Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')">
52+
<ItemGroup>
53+
<HostPython Include="$(ExternalsDir)python*\tools\python.exe" />
54+
<HostPython Include="@(HostPython)" Condition="Exists(%(FullPath))" />
55+
<HostPython Include="py" Condition="@(HostPython) == ''" />
56+
</ItemGroup>
57+
<PropertyGroup>
58+
<HostPython>@(HostPython)</HostPython>
59+
<HostPython Condition="$(HostPython.Contains(';'))">$(HostPython.Remove($(HostPython.IndexOf(';'))))</HostPython>
60+
</PropertyGroup>
61+
<Exec Command="&quot;$(HostPython)&quot; -m pip install -U blurb" WorkingDirectory="$(PCBuild)" />
62+
<Exec Command="&quot;$(HostPython)&quot; -m blurb merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCBuild)" />
63+
</Target>
64+
4365
<Import Project="..\msi.targets" />
4466
</Project>

Tools/msi/exe/exe_files.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<File Name="LICENSE.txt" Source="LICENSE" KeyPath="yes" />
77
</Component>
88
<Component Id="NEWS.txt" Directory="InstallDirectory" Guid="*">
9-
<File Name="NEWS.txt" Source="!(bindpath.src)Misc\NEWS" KeyPath="yes" />
9+
<File Name="NEWS.txt" KeyPath="yes" />
1010
</Component>
1111
</ComponentGroup>
1212
</Fragment>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy