Change method to locate ibex root to relative paths

I had used git to identify the repo root previously but this obviously does not
work with vendoring.
This commit is contained in:
Harry Callahan 2022-08-19 10:52:50 +01:00 committed by Marno van der Maas
parent f2f77a3cac
commit 781f8445d8
2 changed files with 2 additions and 4 deletions

View file

@ -4,13 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import sys import sys
import git
import pathlib3x as pathlib import pathlib3x as pathlib
def get_project_root() -> pathlib.Path: def get_project_root() -> pathlib.Path:
"""Get the project root directory using git.""" """Get the project root directory."""
return pathlib.Path(git.Repo('.', search_parent_directories=True).working_tree_dir) return pathlib.Path(__file__).resolve().parents[4]
root = get_project_root() root = get_project_root()

View file

@ -14,7 +14,6 @@ junit-xml
# dataclass # needed for backports? # dataclass # needed for backports?
pathlib3x # Backports some useful features pathlib3x # Backports some useful features
typing-utils # Ditto typing-utils # Ditto
gitpython
typeguard typeguard
portalocker portalocker