File tree Expand file tree Collapse file tree
Source/UnrealEnginePython Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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>
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments