Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-02 11:33:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-02 11:33:32 +0300
commitd49c71e96e55e16f117043a05aa0a35493bd768c (patch)
tree8cdbf6e17c8fa57ff3bbf79208f79caf8d652628 /source/blender/python/generic
parent27acf8ced879bdee7cf62b42099d73dce5d72fd4 (diff)
Cleanup: use logging for "Found bundled Python" message
This was added when Python was initially bundled so any problems finding Python could be investigated. Move this to use logging so we can show this information when needed.
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r--source/blender/python/generic/py_capi_utils.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 6c02e293789..d944cb435d0 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -893,18 +893,6 @@ void PyC_MainModule_Restore(PyObject *main_mod)
*/
void PyC_SetHomePath(const char *py_path_bundle)
{
- if (py_path_bundle == NULL) {
- /* Common enough to have bundled *nix python but complain on OSX/Win */
-# if defined(__APPLE__) || defined(_WIN32)
- fprintf(stderr,
- "Warning! bundled python not found and is expected on this platform. "
- "(if you built with CMake: 'install' target may have not been built)\n");
-# endif
- return;
- }
- /* set the environment path */
- printf("found bundled python: %s\n", py_path_bundle);
-
# ifdef __APPLE__
/* OSX allow file/directory names to contain : character (represented as / in the Finder)
* but current Python lib (release 3.1.1) doesn't handle these correctly */
@@ -915,19 +903,14 @@ void PyC_SetHomePath(const char *py_path_bundle)
}
# endif
- {
- wchar_t py_path_bundle_wchar[1024];
-
- /* Can't use this, on linux gives bug: T23018,
- * TODO: try LANG="en_US.UTF-8" /usr/bin/blender, suggested 2008 */
- /* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */
+ /* Set the environment path. */
+ wchar_t py_path_bundle_wchar[1024];
- BLI_strncpy_wchar_from_utf8(
- py_path_bundle_wchar, py_path_bundle, ARRAY_SIZE(py_path_bundle_wchar));
+ /* Can't use `mbstowcs` on linux gives bug: T23018. */
+ BLI_strncpy_wchar_from_utf8(
+ py_path_bundle_wchar, py_path_bundle, ARRAY_SIZE(py_path_bundle_wchar));
- Py_SetPythonHome(py_path_bundle_wchar);
- // printf("found python (wchar_t) '%ls'\n", py_path_bundle_wchar);
- }
+ Py_SetPythonHome(py_path_bundle_wchar);
}
bool PyC_IsInterpreterActive(void)