Untitled

Pasted by Anonymous on Fri Nov 20 21:36:28 2020 UTC as Bash Session
zyp@rin fpga_sandbox $ ls deps
__init__.py			litedram			litescope			migen				pythondata-software-compiler_rt
__init__.pyc			liteeth				litex				pythondata-cpu-serv
__pycache__			liteiclink			litex-boards			pythondata-cpu-vexriscv
zyp@rin fpga_sandbox $ cat deps/__init__.py
import sys
import pathlib
import os

ignore = [
	'__pycache__',
]

paths = [str(p) for p in pathlib.Path(__file__).parent.iterdir() if p.is_dir() and p not in ignore]

for p in paths:
	sys.path.insert(1, p)

os.environ['PYTHONPATH'] = ':'.join(paths) # TODO: Prepend rather than replace.
zyp@rin fpga_sandbox $