mirror of
https://github.com/lowRISC/ibex.git
synced 2025-06-28 09:17:17 -04:00
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:
parent
f2f77a3cac
commit
781f8445d8
2 changed files with 2 additions and 4 deletions
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue