Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in make setup: setup-cocotb-env is not run using venv-cocotb python #370

Open
bman12three4 opened this issue Aug 10, 2024 · 1 comment

Comments

@bman12three4
Copy link

I believe this is the fix:

diff --git a/Makefile b/Makefile
index 8bbd1b6..0de8a89 100644
--- a/Makefile
+++ b/Makefile
@@ -349,7 +349,7 @@ install-caravel-cocotb:

 .PHONY: setup-cocotb-env
 setup-cocotb-env:
-       @(python3 $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))
+       @(./venv-cocotb/bin/$(PYTHON_BIN) $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))

 .PHONY: setup-cocotb
 setup-cocotb: install-caravel-cocotb setup-cocotb-env simenv-cocotb
@d-m-bailey
Copy link

@bman12three4 good catch!

I'm thinking the solution might be to activate the virtual enviroment within the Makefile.

*** 338,349 ****
  install-caravel-cocotb:
        rm -rf ./venv-cocotb
        $(PYTHON_BIN) -m venv ./venv-cocotb
!       ./venv-cocotb/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir pip
!       ./venv-cocotb/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir caravel-cocotb
  
  .PHONY: setup-cocotb-env
  setup-cocotb-env:
!       @(python3 $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))
  
  .PHONY: setup-cocotb
  setup-cocotb: install-caravel-cocotb setup-cocotb-env simenv-cocotb
--- 338,351 ----
  install-caravel-cocotb:
        rm -rf ./venv-cocotb
        $(PYTHON_BIN) -m venv ./venv-cocotb
!       . ./venv-cocotb/bin/activate && \
!       $(PYTHON_BIN) -m pip install --upgrade --no-cache-dir pip && \
!       $(PYTHON_BIN) -m pip install --upgrade --no-cache-dir caravel-cocotb
  
  .PHONY: setup-cocotb-env
  setup-cocotb-env:
!       @(. ./venv-cocotb/bin/activate && \
!       python3 $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))
  
  .PHONY: setup-cocotb
  setup-cocotb: install-caravel-cocotb setup-cocotb-env simenv-cocotb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants