Skip to content

Commit 89161ee

Browse files
author
Roberto De Ioris
committed
build system is too flaky, better to falback to a manual setup
1 parent 3a3d716 commit 89161ee

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎Source/UnrealEnginePython/Private/UnrealEnginePython.cpp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ void FUnrealEnginePythonModule::StartupModule()
1717

1818
PyObject *py_sys = PyImport_ImportModule("sys");
1919
PyObject *py_sys_dict = PyModule_GetDict(py_sys);
20+
2021
PyObject *py_path = PyDict_GetItemString(py_sys_dict, "path");
2122

23+
char *zip_path = TCHAR_TO_UTF8(*FPaths::Combine(*FPaths::GameContentDir(), UTF8_TO_TCHAR("python35.zip")));
24+
PyObject *py_zip_path = PyUnicode_FromString(zip_path);
25+
PyList_Insert(py_path, 0, py_zip_path);
26+
2227
char *scripts_path = TCHAR_TO_UTF8(*FPaths::Combine(*FPaths::GameContentDir(), UTF8_TO_TCHAR("Scripts")));
23-
2428
PyObject *py_scripts_path = PyUnicode_FromString(scripts_path);
2529
PyList_Insert(py_path, 0, py_scripts_path);
2630

‎Source/UnrealEnginePython/UnrealEnginePython.Build.cs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ public UnrealEnginePython(TargetInfo Target)
7070

7171

7272
PublicIncludePaths.Add(PythonHome);
73-
PublicLibraryPaths.Add(PythonHome + "/libs/");
74-
PublicAdditionalLibraries.Add("python35.lib");
75-
76-
RuntimeDependencies.Add(new RuntimeDependency(PythonHome + "/python35.dll"));
77-
RuntimeDependencies.Add(new RuntimeDependency(PythonHome + "/python35.zip"));
73+
PublicAdditionalLibraries.Add(Path.Combine(PythonHome, "libs", "python35.lib"));
7874

7975
}
8076
}

0 commit comments

Comments
 (0)