2020-02-16 14:00:51 +00:00
|
|
|
import os, sys, glob
|
2020-02-08 21:57:47 +00:00
|
|
|
|
2020-02-17 08:36:17 +00:00
|
|
|
$UPDATE_OS_ENVIRON=True
|
|
|
|
|
2019-11-03 13:06:26 +00:00
|
|
|
$XXH_HOME = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
$PIP_TARGET = os.path.join($XXH_HOME, 'pip')
|
|
|
|
$PYTHONPATH = $PIP_TARGET
|
|
|
|
$PATH = [ os.path.join($PYTHONHOME, 'bin'), $XXH_HOME ] + $PATH
|
|
|
|
sys.path.append($PIP_TARGET)
|
2020-02-08 21:57:47 +00:00
|
|
|
aliases['xxh'] = os.path.join($XXH_HOME, 'xonsh') + ' ' + os.path.join($XXH_HOME, 'xxh')
|
2019-11-03 13:06:26 +00:00
|
|
|
|
2020-02-16 14:00:51 +00:00
|
|
|
for plugin_path in sorted(glob.glob(os.path.join($XXH_HOME, 'plugins/**'))):
|
|
|
|
if os.path.exists(os.path.join(plugin_path, 'xonshrc.xsh')):
|
|
|
|
sys.path.append(plugin_path)
|
|
|
|
__import__('xonshrc')
|
|
|
|
del sys.modules['xonshrc']
|
|
|
|
sys.path.remove(plugin_path)
|