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>2016-02-15 11:01:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-15 11:05:25 +0300
commitaa8fc57f1e7683e0490fad5dc2fc18bdba2cee5b (patch)
tree0e0224f28f842549afe85473effbc95c5e0c1579 /source/blender/blenkernel/intern/appdir.c
parent3d24e57ce8233a2f25d52b7f567e458dda2c8f98 (diff)
Fix for Python executable not being found on Linux
Python name could include ABI-flags after the version, since checking for all combinations of ABI flags can expand into many possibilities, take the executable name from the build system.
Diffstat (limited to 'source/blender/blenkernel/intern/appdir.c')
-rw-r--r--source/blender/blenkernel/intern/appdir.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index dd961eacb58..de21d9105e2 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -597,10 +597,20 @@ bool BKE_appdir_program_python_search(
char *fullpath, const size_t fullpath_len,
const int version_major, const int version_minor)
{
+#ifdef PYTHON_EXECUTABLE_NAME
+ /* passed in from the build-systems 'PYTHON_EXECUTABLE' */
+ const char *python_build_def = STRINGIFY(PYTHON_EXECUTABLE_NAME);
+#endif
const char *basename = "python";
char python_ver[16];
/* check both possible names */
- const char *python_names[] = {python_ver, basename};
+ const char *python_names[] = {
+#ifdef PYTHON_EXECUTABLE_NAME
+ python_build_def,
+#endif
+ python_ver,
+ basename,
+ };
int i;
bool is_found = false;