Coverage for tsfpga/examples/example_pythonpath.py: 0%

7 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2022-11-29 20:01 +0000

1# -------------------------------------------------------------------------------------------------- 

2# Copyright (c) Lukas Vik. All rights reserved. 

3# 

4# This file is part of the tsfpga project, a project platform for modern FPGA development. 

5# https://tsfpga.com 

6# https://gitlab.com/tsfpga/tsfpga 

7# -------------------------------------------------------------------------------------------------- 

8 

9""" 

10Import this file in order to have the default locations of the hdl_registers/hdl_registers 

11and vunit/vunit repos added to PYTHONPATH. 

12""" 

13 

14# Standard libraries 

15import sys 

16 

17# First party libraries 

18import tsfpga 

19 

20# Do PYTHONPATH insert() instead of append() to prefer any local repo checkout over any pip install 

21PATH_TO_HDL_REGISTERS = tsfpga.REPO_ROOT.parent.parent.resolve() / "hdl_registers" / "hdl_registers" 

22sys.path.insert(0, str(PATH_TO_HDL_REGISTERS)) 

23PATH_TO_VUNIT = tsfpga.REPO_ROOT.parent.parent.resolve() / "vunit" / "vunit" 

24sys.path.insert(0, str(PATH_TO_VUNIT))