Skip to content

Commit

Permalink
bugfix: odb steps dropping PYTHONPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Oct 26, 2024
1 parent 627a5ab commit d68dc83
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
## Documentation
-->

# 2.2.2

## Steps

* `Odb.*`
* Fixed OpenROAD dropping user-set `PYTHONPATH` values.

## Tool Updates

* Use `NIX_PYTHONPATH` instead of `PYTHONPATH` in Docker and devshells
to avoid collisions with user-set `PYTHONPATH` variables.

# 2.2.1

This patch has no functional changes to OpenLane proper.
Expand Down
2 changes: 1 addition & 1 deletion nix/create-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ in
devshell.packages = packages;
env = [
{
name = "PYTHONPATH";
name = "NIX_PYTHONPATH";
value = "${openlane-env-sitepackages}";
}
];
Expand Down
2 changes: 1 addition & 1 deletion nix/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ in
"LC_ALL=C.UTF-8"
"LC_CTYPE=C.UTF-8"
"EDITOR=nvim"
"PYTHONPATH=${openlane-env-sitepackages}"
"NIX_PYTHONPATH=${openlane-env-sitepackages}"
"TMPDIR=/tmp"
];
image-config-extra-path = [
Expand Down
4 changes: 3 additions & 1 deletion openlane/steps/odb.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def run(self, state_in, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
str(state_in[DesignFormat.ODB]),
]

env["PYTHONPATH"] = os.path.join(get_script_dir(), "odbpy")
env["PYTHONPATH"] = (
f'{os.path.join(get_script_dir(), "odbpy")}:{env.get("PYTHONPATH")}'
)

subprocess_result = self.run_subprocess(
command,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openlane"
version = "2.2.1"
version = "2.2.2"
description = "An infrastructure for implementing chip design flows"
authors = ["Efabless Corporation and Contributors <[email protected]>"]
readme = "Readme.md"
Expand Down

0 comments on commit d68dc83

Please sign in to comment.