Skip to content

Commit

Permalink
don't place config.py dir on PYTHONPATH
Browse files Browse the repository at this point in the history
closes #1628
  • Loading branch information
t-kalinowski committed Jun 28, 2024
1 parent 9133fa3 commit 77bbf72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inst/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def module_path(name):

# Get appropriate path-entry separator for platform
pathsep = ";" if os.name == "nt" else ":"
this_script_dir = os.path.dirname(__file__)

# Read default configuration values
# fmt: off
Expand All @@ -43,7 +44,8 @@ def module_path(name):
"Prefix" : getattr(sys, "prefix", ""),
"ExecPrefix" : getattr(sys, "exec_prefix", ""),
"BaseExecPrefix" : getattr(sys, "base_exec_prefix", ""),
"PythonPath" : pathsep.join((x or "." for x in sys.path)),
"PythonPath" : pathsep.join((x or "." for x in sys.path
if x != this_script_dir)),
"LIBPL" : sysconfig.get_config_var("LIBPL"),
"LIBDIR" : sysconfig.get_config_var("LIBDIR"),
"SharedLibrary" : sysconfig.get_config_var("Py_ENABLE_SHARED"),
Expand Down

0 comments on commit 77bbf72

Please sign in to comment.