[Python-checkins] bpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)

Chris Martinez webhook-mailer at python.org
Fri Apr 3 16:03:59 EDT 2020


https://github.com/python/cpython/commit/6e623ff9d251e0ce86e9b18a01bfd6f067079d7a
commit: 6e623ff9d251e0ce86e9b18a01bfd6f067079d7a
branch: master
author: Chris Martinez <sydefekt at hotmail.com>
committer: GitHub <noreply at github.com>
date: 2020-04-03T21:03:54+01:00
summary:

bpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)

Fix default Python home path relative to the NuGet package

files:
A Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst
M PC/layout/support/props.py

diff --git a/Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst b/Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst
new file mode 100644
index 0000000000000..a81548c3f9cdf
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2020-04-03-17-54-33.bpo-40158.MWUTs4.rst
@@ -0,0 +1 @@
+Fix CPython MSBuild Properties in NuGet Package (build/native/python.props)
\ No newline at end of file
diff --git a/PC/layout/support/props.py b/PC/layout/support/props.py
index b1560b5244762..1eb9b7c06da51 100644
--- a/PC/layout/support/props.py
+++ b/PC/layout/support/props.py
@@ -29,8 +29,7 @@
 PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?>
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Condition="$(Platform) == '{PYTHON_PLATFORM}'">
-    <PythonHome Condition="$(Configuration) == 'Debug'">$([msbuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), "python_d.exe")</PythonHome>
-    <PythonHome Condition="$(PythonHome) == ''">$([msbuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), "python.exe")</PythonHome>
+    <PythonHome Condition="$(PythonHome) == ''">$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)\..\..\tools"))</PythonHome>
     <PythonInclude>$(PythonHome)\include</PythonInclude>
     <PythonLibs>$(PythonHome)\libs</PythonLibs>
     <PythonTag>{PYTHON_TAG}</PythonTag>



More information about the Python-checkins mailing list