librelane 2.4.0.dev3__py3-none-any.whl → 2.4.0.dev4__py3-none-any.whl

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.

Potentially problematic release.


This version of librelane might be problematic. Click here for more details.

librelane/steps/pyosys.py CHANGED
@@ -14,8 +14,10 @@
14
14
  import os
15
15
  import re
16
16
  import io
17
+ import sys
17
18
  import json
18
19
  import fnmatch
20
+ import shutil
19
21
  import subprocess
20
22
  from decimal import Decimal
21
23
  from abc import abstractmethod
@@ -207,7 +209,11 @@ class PyosysStep(Step):
207
209
 
208
210
  def get_command(self, state_in: State) -> List[str]:
209
211
  script_path = self.get_script_path()
210
- cmd = ["yosys", "-y", script_path]
212
+ # HACK: Get Colab working
213
+ yosys_bin = "yosys"
214
+ if "google.colab" in sys.modules:
215
+ yosys_bin = shutil.which("yosys") or "yosys"
216
+ cmd = [yosys_bin, "-y", script_path]
211
217
  if self.config["YOSYS_LOG_LEVEL"] != "ALL":
212
218
  cmd += ["-Q"]
213
219
  if self.config["YOSYS_LOG_LEVEL"] == "WARNING":
@@ -220,6 +226,11 @@ class PyosysStep(Step):
220
226
 
221
227
  def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
222
228
  cmd = self.get_command(state_in)
229
+ # HACK: Get Colab working
230
+ if "google.colab" in sys.modules:
231
+ kwargs, env = self.extract_env(kwargs)
232
+ env.pop("PATH", "")
233
+ kwargs["env"] = env
223
234
  subprocess_result = super().run_subprocess(cmd, **kwargs)
224
235
  return {}, subprocess_result["generated_metrics"]
225
236
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: librelane
3
- Version: 2.4.0.dev3
3
+ Version: 2.4.0.dev4
4
4
  Summary: An infrastructure for implementing chip design flows
5
5
  Home-page: https://github.com/librelane/librelane
6
6
  License: Apache-2.0
@@ -158,12 +158,12 @@ librelane/steps/netgen.py,sha256=R9sDWv-9wKMdi2rkuLQdOc4uLlbYhXcKKd6WsZsnLt0,895
158
158
  librelane/steps/odb.py,sha256=_WhAFEVbFioSGsVrGbXQVqcXYAnE22gLA4eF1v028EQ,38030
159
159
  librelane/steps/openroad.py,sha256=0uHbFYO3wT9rFkovxMgr4rMzaMpA9DvG8sWLM4L3jn8,85836
160
160
  librelane/steps/openroad_alerts.py,sha256=IJyB4piBDCKXhkJswHGMYCRDwbdQsR0GZlrGGDhmW6Q,3364
161
- librelane/steps/pyosys.py,sha256=bBKCIiKxbAQXrEgR1gdg2el-IpuZoUzLOwR62-ilwQg,22326
161
+ librelane/steps/pyosys.py,sha256=mnbPR267XzJvDhtXW4cdTAB3IqvksUZt4ch5xQHgdY0,22705
162
162
  librelane/steps/step.py,sha256=YkUWbxx2dOz0QR90jM5NC7neFkWO1RW5zJc0I_XxRyc,54975
163
163
  librelane/steps/tclstep.py,sha256=0PMWJ6C3dKnlQf9mA9rZntgxUBCiByE9csHcEcM1iq0,10027
164
164
  librelane/steps/verilator.py,sha256=MWx2TpLqYyea9_jSeLG9c2S5ujvYERQZRFNaMhfHxZE,7916
165
165
  librelane/steps/yosys.py,sha256=GX6rTiQG-ZhDxfB9SxrPQ9Sab3WC84p0OUtqiL1Nubk,12533
166
- librelane-2.4.0.dev3.dist-info/METADATA,sha256=ycb_5xJHsFD3ETcy_FObKWoWc64Ck0BpJ4cGB2Ts3DE,6600
167
- librelane-2.4.0.dev3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
168
- librelane-2.4.0.dev3.dist-info/entry_points.txt,sha256=GTBvXykNMMFsNKiJFgtEw7P1wb_VZIqVM35EFSpyZQE,263
169
- librelane-2.4.0.dev3.dist-info/RECORD,,
166
+ librelane-2.4.0.dev4.dist-info/METADATA,sha256=EjKTd191ptXMgWO4Qd-SrS08v70GdDtJORd-kJS38Z0,6600
167
+ librelane-2.4.0.dev4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
168
+ librelane-2.4.0.dev4.dist-info/entry_points.txt,sha256=GTBvXykNMMFsNKiJFgtEw7P1wb_VZIqVM35EFSpyZQE,263
169
+ librelane-2.4.0.dev4.dist-info/RECORD,,