bpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)
Fix default Python home path relative to the NuGet package
(cherry picked from commit 6e623ff9d2
)
Co-authored-by: Chris Martinez <sydefekt@hotmail.com>
This commit is contained in:
parent
e6783981df
commit
e6685ad053
|
@ -0,0 +1 @@
|
||||||
|
Fix CPython MSBuild Properties in NuGet Package (build/native/python.props)
|
|
@ -29,8 +29,7 @@ PROPS_DATA["PYTHON_TARGET"] = "_GetPythonRuntimeFilesDependsOn{}{}_{}".format(
|
||||||
PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?>
|
PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Condition="$(Platform) == '{PYTHON_PLATFORM}'">
|
<PropertyGroup Condition="$(Platform) == '{PYTHON_PLATFORM}'">
|
||||||
<PythonHome Condition="$(Configuration) == 'Debug'">$([msbuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), "python_d.exe")</PythonHome>
|
<PythonHome Condition="$(PythonHome) == ''">$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)\..\..\tools"))</PythonHome>
|
||||||
<PythonHome Condition="$(PythonHome) == ''">$([msbuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), "python.exe")</PythonHome>
|
|
||||||
<PythonInclude>$(PythonHome)\include</PythonInclude>
|
<PythonInclude>$(PythonHome)\include</PythonInclude>
|
||||||
<PythonLibs>$(PythonHome)\libs</PythonLibs>
|
<PythonLibs>$(PythonHome)\libs</PythonLibs>
|
||||||
<PythonTag>{PYTHON_TAG}</PythonTag>
|
<PythonTag>{PYTHON_TAG}</PythonTag>
|
||||||
|
|
Loading…
Reference in New Issue