summaryrefslogtreecommitdiff
path: root/PC/getpathp.c
diff options
context:
space:
mode:
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r--PC/getpathp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 01455a660b..0ee53080bf 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -1003,9 +1003,12 @@ calculate_path_impl(const PyConfig *config,
calculate_home_prefix(calculate, prefix);
- status = calculate_module_search_path(config, calculate, pathconfig, prefix);
- if (_PyStatus_EXCEPTION(status)) {
- return status;
+ if (pathconfig->module_search_path == NULL) {
+ status = calculate_module_search_path(config, calculate,
+ pathconfig, prefix);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+ }
}
done: