Coverage for tsfpga/examples/example_pythonpath.py: 100%
6 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-21 20:51 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-21 20:51 +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://github.com/tsfpga/tsfpga
7# --------------------------------------------------------------------------------------------------
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"""
14import sys
16import tsfpga
18# Do PYTHONPATH insert() instead of append() to prefer any local repo checkout over any pip install.
20# Paths e.g.
21# repo/tsfpga/tsfpga
22# repo/hdl-registers/hdl-registers
23PATH_TO_HDL_REGISTERS = tsfpga.REPO_ROOT.parent.parent.resolve() / "hdl-registers" / "hdl-registers"
24sys.path.insert(0, str(PATH_TO_HDL_REGISTERS))
26# Paths e.g.
27# repo/tsfpga/tsfpga
28# repo/vunit/vunit
29PATH_TO_VUNIT = tsfpga.REPO_ROOT.parent.parent.resolve() / "vunit" / "vunit"
30sys.path.insert(0, str(PATH_TO_VUNIT))