Skip to content

Commit 27ae881

Browse files
committed
Mac Path
1 parent 3451257 commit 27ae881

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

‎Source/UnrealEnginePython/Public/UnrealEnginePython.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include "Runtime/Launch/Resources/Version.h"
2828

2929
#if PLATFORM_MAC
30-
#include <Headers/Python.h>
31-
#include <Headers/structmember.h>
30+
#include <Python.h>
31+
#include <structmember.h>
3232
#elif PLATFORM_LINUX
3333
#include <Python.h>
3434
#include <structmember.h>

‎Source/UnrealEnginePython/UnrealEnginePython.Build.cs‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,10 @@ public UnrealEnginePython(TargetInfo Target)
235235
}
236236
else if (Target.Platform == UnrealTargetPlatform.Mac)
237237
{
238-
if (pythonHome == "")
239-
{
240-
pythonHome = DiscoverPythonPath(macKnownPaths, "Mac");
241-
if (pythonHome == "")
242-
{
243-
throw new System.Exception("Unable to find Python installation");
244-
}
245-
}
246-
System.Console.WriteLine("Using Python at: " + pythonHome);
247-
PublicIncludePaths.Add(pythonHome);
248-
string libPath = GetMacPythonLibFile(pythonHome);
249-
PublicAdditionalLibraries.Add(Path.GetDirectoryName(libPath));
250-
PublicDelayLoadDLLs.Add(libPath);
238+
string PythonHome = Path.Combine(Target.UEThirdPartySourceDirectory, "Python3/Mac/include");
239+
PublicIncludePaths.Add(PythonHome);
240+
string LibPath = Path.Combine(Target.UEThirdPartyBinariesDirectory, "Python3/Mac/lib/libpython3.9.dylib");
241+
PublicDelayLoadDLLs.Add(LibPath);
251242
}
252243
else if (Target.Platform == UnrealTargetPlatform.Linux)
253244
{

0 commit comments

Comments
 (0)