Skip to content

Commit

Permalink
Make python scripts find some util folders
Browse files Browse the repository at this point in the history
Tested in venv and conda
  • Loading branch information
Marc Bornand committed May 22, 2024
1 parent 701c819 commit 5627946
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export
## @section Conda
conda: environment.yml
conda env create -f environment.yml
sed 's,ROOT_PATH,$(shell pwd),g' x_heep_pythonpath.pth > `conda run -n core-v-mini-mcu python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`/x_heep_pythonpath.pth

environment.yml: python-requirements.txt
util/python-requirements2conda.sh
Expand Down
1 change: 1 addition & 0 deletions Makefile.venv
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ endif
$(VENV):
$(PY) -m venv $(VENVDIR)
$(VENV)/python -m pip install --upgrade pip setuptools wheel
sed 's,ROOT_PATH,$(shell pwd),g' x_heep_pythonpath.pth > `$(VENV)/python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`/x_heep_pythonpath.pth

$(VENV)/$(MARKER): $(VENVDEPENDS) | $(VENV)
ifneq ($(strip $(REQUIREMENTS_TXT)),)
Expand Down
1 change: 1 addition & 0 deletions x_heep_pythonpath.pth
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import sys, os; sys.path.insert(0, os.path.abspath("ROOT_PATH/util")); sys.path.insert(0, os.path.abspath("ROOT_PATH/hw/vendor/pulp_platform_register_interface/vendor/lowrisc_opentitan/util"))

0 comments on commit 5627946

Please sign in to comment.