chipfoundry-cli 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/PKG-INFO +1 -1
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/chipfoundry_cli/main.py +71 -75
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/pyproject.toml +1 -1
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/LICENSE +0 -0
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/README.md +0 -0
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/chipfoundry_cli/__init__.py +0 -0
- {chipfoundry_cli-1.2.6 → chipfoundry_cli-1.2.7}/chipfoundry_cli/utils.py +0 -0
|
@@ -1581,7 +1581,8 @@ def setup(project_root, repo_owner, repo_name, branch, pdk, caravel_lite,
|
|
|
1581
1581
|
# Step 5: Install PDK with Ciel
|
|
1582
1582
|
if install_pdk:
|
|
1583
1583
|
console.print("\n[bold]Step 5:[/bold] Installing PDK with Ciel...")
|
|
1584
|
-
|
|
1584
|
+
# Use a dedicated venv location independent of Caravel
|
|
1585
|
+
ciel_venv_dir = project_root_path / 'dependencies' / 'ciel-venv'
|
|
1585
1586
|
pdk_root = project_root_path / 'dependencies' / 'pdks'
|
|
1586
1587
|
|
|
1587
1588
|
# Determine OPEN_PDKS_COMMIT based on PDK
|
|
@@ -1595,7 +1596,7 @@ def setup(project_root, repo_owner, repo_name, branch, pdk, caravel_lite,
|
|
|
1595
1596
|
|
|
1596
1597
|
# Check if already installed
|
|
1597
1598
|
is_installed = (
|
|
1598
|
-
check_python_package_installed(
|
|
1599
|
+
check_python_package_installed(ciel_venv_dir, 'ciel') and
|
|
1599
1600
|
pdk_version_file.exists() and
|
|
1600
1601
|
(pdk_root / pdk).exists()
|
|
1601
1602
|
)
|
|
@@ -1609,79 +1610,78 @@ def setup(project_root, repo_owner, repo_name, branch, pdk, caravel_lite,
|
|
|
1609
1610
|
console.print(f"[dim]Would install PDK {pdk} using Ciel[/dim]")
|
|
1610
1611
|
else:
|
|
1611
1612
|
try:
|
|
1612
|
-
#
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1613
|
+
# Ensure dependencies directory exists
|
|
1614
|
+
dependencies_dir = project_root_path / 'dependencies'
|
|
1615
|
+
dependencies_dir.mkdir(exist_ok=True)
|
|
1616
|
+
|
|
1617
|
+
# Remove existing venv if overwriting or doesn't exist
|
|
1618
|
+
if ciel_venv_dir.exists() and (overwrite or not is_installed):
|
|
1619
|
+
console.print("[cyan]Removing existing Ciel venv...[/cyan]")
|
|
1620
|
+
shutil.rmtree(ciel_venv_dir)
|
|
1621
|
+
|
|
1622
|
+
if not ciel_venv_dir.exists():
|
|
1623
|
+
console.print("[cyan]Creating Ciel virtual environment...[/cyan]")
|
|
1624
|
+
subprocess.run(
|
|
1625
|
+
[sys.executable, '-m', 'venv', str(ciel_venv_dir)],
|
|
1626
|
+
check=True,
|
|
1627
|
+
capture_output=True
|
|
1628
|
+
)
|
|
1622
1629
|
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1630
|
+
venv_python = str(ciel_venv_dir / 'bin' / 'python3')
|
|
1631
|
+
|
|
1632
|
+
console.print("[cyan]Installing Ciel...[/cyan]")
|
|
1633
|
+
subprocess.run(
|
|
1634
|
+
[venv_python, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir', 'pip'],
|
|
1635
|
+
check=True,
|
|
1636
|
+
capture_output=True
|
|
1637
|
+
)
|
|
1638
|
+
subprocess.run(
|
|
1639
|
+
[venv_python, '-m', 'pip', 'install', '--upgrade', '--no-cache-dir', 'ciel'],
|
|
1640
|
+
check=True,
|
|
1641
|
+
capture_output=True
|
|
1642
|
+
)
|
|
1643
|
+
console.print("[green]✓[/green] Ciel installed successfully")
|
|
1644
|
+
|
|
1645
|
+
# Remove existing PDK if overwriting
|
|
1646
|
+
if (pdk_root / pdk).exists() and overwrite:
|
|
1647
|
+
console.print(f"[cyan]Removing existing PDK {pdk}...[/cyan]")
|
|
1648
|
+
shutil.rmtree(pdk_root / pdk)
|
|
1649
|
+
|
|
1650
|
+
if not (pdk_root / pdk).exists():
|
|
1651
|
+
console.print(f"[cyan]Enabling PDK {pdk} with Ciel...[/cyan]")
|
|
1652
|
+
console.print("[dim]Downloading and installing PDK files...[/dim]")
|
|
1653
|
+
|
|
1654
|
+
# Determine PDK family from PDK variant (sky130A/sky130B -> sky130)
|
|
1655
|
+
pdk_family = pdk.rstrip('AB') # Remove A or B suffix
|
|
1656
|
+
|
|
1657
|
+
ciel_bin = str(ciel_venv_dir / 'bin' / 'ciel')
|
|
1645
1658
|
|
|
1646
|
-
#
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1659
|
+
# Set up environment with PDK_ROOT
|
|
1660
|
+
env = os.environ.copy()
|
|
1661
|
+
env['PDK_ROOT'] = str(pdk_root)
|
|
1662
|
+
env['CIEL_DATA_SOURCE'] = 'static-web:https://chipfoundry.github.io/ciel-releases'
|
|
1650
1663
|
|
|
1664
|
+
# Run from project root instead of caravel directory
|
|
1665
|
+
result = subprocess.run(
|
|
1666
|
+
[ciel_bin, 'enable', '--pdk-family', pdk_family, open_pdks_commit],
|
|
1667
|
+
cwd=str(project_root_path),
|
|
1668
|
+
env=env,
|
|
1669
|
+
capture_output=True,
|
|
1670
|
+
text=True,
|
|
1671
|
+
check=True
|
|
1672
|
+
)
|
|
1673
|
+
|
|
1674
|
+
# Verify PDK was actually installed
|
|
1651
1675
|
if not (pdk_root / pdk).exists():
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
env = os.environ.copy()
|
|
1662
|
-
env['PDK_ROOT'] = str(pdk_root)
|
|
1663
|
-
env['CIEL_DATA_SOURCE'] = 'static-web:https://chipfoundry.github.io/ciel-releases'
|
|
1664
|
-
|
|
1665
|
-
result = subprocess.run(
|
|
1666
|
-
[ciel_bin, 'enable', '--pdk-family', pdk_family, open_pdks_commit],
|
|
1667
|
-
cwd=str(caravel_dir),
|
|
1668
|
-
env=env,
|
|
1669
|
-
capture_output=True,
|
|
1670
|
-
text=True,
|
|
1671
|
-
check=True
|
|
1672
|
-
)
|
|
1673
|
-
|
|
1674
|
-
# Verify PDK was actually installed
|
|
1675
|
-
if not (pdk_root / pdk).exists():
|
|
1676
|
-
raise Exception(f"PDK directory {pdk_root / pdk} was not created by Ciel")
|
|
1677
|
-
|
|
1678
|
-
# Create version file only if PDK exists
|
|
1679
|
-
pdk_root.mkdir(parents=True, exist_ok=True)
|
|
1680
|
-
with open(pdk_version_file, 'w') as f:
|
|
1681
|
-
f.write(f'{open_pdks_commit}\n')
|
|
1682
|
-
|
|
1683
|
-
console.print("[green]✓[/green] PDK installed successfully")
|
|
1684
|
-
console.print(f"[dim]PDK installed to: {pdk_root}[/dim]")
|
|
1676
|
+
raise Exception(f"PDK directory {pdk_root / pdk} was not created by Ciel")
|
|
1677
|
+
|
|
1678
|
+
# Create version file only if PDK exists
|
|
1679
|
+
pdk_root.mkdir(parents=True, exist_ok=True)
|
|
1680
|
+
with open(pdk_version_file, 'w') as f:
|
|
1681
|
+
f.write(f'{open_pdks_commit}\n')
|
|
1682
|
+
|
|
1683
|
+
console.print("[green]✓[/green] PDK installed successfully")
|
|
1684
|
+
console.print(f"[dim]PDK installed to: {pdk_root}[/dim]")
|
|
1685
1685
|
|
|
1686
1686
|
except subprocess.CalledProcessError as e:
|
|
1687
1687
|
maybe_abort_no_space(e, "PDK install")
|
|
@@ -2059,7 +2059,6 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2059
2059
|
execution_method = "Nix" if use_nix else "Docker"
|
|
2060
2060
|
|
|
2061
2061
|
# Set up environment variables
|
|
2062
|
-
caravel_root = project_root_path / 'caravel'
|
|
2063
2062
|
pdk_root = project_root_path / 'dependencies' / 'pdks'
|
|
2064
2063
|
|
|
2065
2064
|
if not pdk:
|
|
@@ -2119,7 +2118,6 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2119
2118
|
env = os.environ.copy()
|
|
2120
2119
|
env.update({
|
|
2121
2120
|
'PROJECT_ROOT': str(project_root_path),
|
|
2122
|
-
'CARAVEL_ROOT': str(caravel_root),
|
|
2123
2121
|
'PDK_ROOT': str(pdk_root),
|
|
2124
2122
|
'PDK': pdk,
|
|
2125
2123
|
'LIBRELANE_RUN_TAG': tag,
|
|
@@ -2133,7 +2131,6 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2133
2131
|
env = os.environ.copy()
|
|
2134
2132
|
env.update({
|
|
2135
2133
|
'PROJECT_ROOT': str(project_root_path),
|
|
2136
|
-
'CARAVEL_ROOT': str(caravel_root),
|
|
2137
2134
|
'PDK_ROOT': str(pdk_root),
|
|
2138
2135
|
'PDK': pdk,
|
|
2139
2136
|
'LIBRELANE_RUN_TAG': tag,
|
|
@@ -2150,7 +2147,6 @@ def harden(macro, project_root, list_designs, tag, pdk, use_nix, use_docker, dry
|
|
|
2150
2147
|
str(venv_bin / 'python3'), '-m', 'librelane',
|
|
2151
2148
|
'-m', str(project_root_path),
|
|
2152
2149
|
'-m', str(pdk_root),
|
|
2153
|
-
'-m', str(caravel_root),
|
|
2154
2150
|
'--dockerized',
|
|
2155
2151
|
]
|
|
2156
2152
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|