Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e623ff

Browse files
bpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)
Fix default Python home path relative to the NuGet package
1 parent 40cf35c commit 6e623ff

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix CPython MSBuild Properties in NuGet Package (build/native/python.props)

PC/layout/support/props.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?>
3030
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3131
<PropertyGroup Condition="$(Platform) == '{PYTHON_PLATFORM}'">
32-
<PythonHome Condition="$(Configuration) == 'Debug'">$([msbuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), "python_d.exe")</PythonHome>
33-
<PythonHome Condition="$(PythonHome) == ''">$([msbuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), "python.exe")</PythonHome>
32+
<PythonHome Condition="$(PythonHome) == ''">$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)\..\..\tools"))</PythonHome>
3433
<PythonInclude>$(PythonHome)\include</PythonInclude>
3534
<PythonLibs>$(PythonHome)\libs</PythonLibs>
3635
<PythonTag>{PYTHON_TAG}</PythonTag>

0 commit comments

Comments
 (0)