Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions chipfoundry_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2374,8 +2374,8 @@ def maybe_abort_no_space(err, step_label):
console.print(f"\n[bold]Step {step_num}:[/bold] Setting up Cocotb...")
venv_cocotb = project_root_path / 'venv-cocotb'

# Check if already installed
is_installed = check_python_package_installed(venv_cocotb, 'caravel-cocotb')
# Check if already installed (package name is caravel_cocotb in pyproject.toml)
is_installed = check_python_package_installed(venv_cocotb, 'caravel_cocotb')

if is_installed and not overwrite:
console.print("[green]✓[/green] Cocotb already installed")
Expand All @@ -2402,14 +2402,18 @@ def maybe_abort_no_space(err, step_label):
# Determine the python executable path in venv
venv_python = str(venv_cocotb / 'bin' / 'python3')

console.print("[cyan]Installing caravel-cocotb...[/cyan]")
console.print("[cyan]Installing caravel-cocotb from source (chipfoundry/caravel-sim-infrastructure)...[/cyan]")
subprocess.run(
[venv_python, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir', 'pip'],
check=True,
capture_output=True
)
# Install from GitHub source (workaround: PyPI package is under efabless, we use chipfoundry repo)
subprocess.run(
[venv_python, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir', 'caravel-cocotb'],
[
venv_python, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir',
'git+https://github.com/chipfoundry/caravel-sim-infrastructure.git@main#subdirectory=cocotb'
],
check=True,
capture_output=True
)
Expand Down
Loading