MCPcopy Create free account
hub / github.com/apache/arrow / get_modified_env_with_pythonpath

Function get_modified_env_with_pythonpath

python/pyarrow/tests/util.py:168–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166
167
168def get_modified_env_with_pythonpath():
169 # Prepend pyarrow root directory to PYTHONPATH
170 env = os.environ.copy()
171 existing_pythonpath = env.get('PYTHONPATH', '')
172
173 module_path = os.path.abspath(
174 os.path.dirname(os.path.dirname(pa.__file__)))
175
176 if existing_pythonpath:
177 new_pythonpath = os.pathsep.join((module_path, existing_pythonpath))
178 else:
179 new_pythonpath = module_path
180 env['PYTHONPATH'] = new_pythonpath
181 return env
182
183
184def invoke_script(script_name, *args):

Callers 1

invoke_scriptFunction · 0.85

Calls 3

copyMethod · 0.80
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected