Skip to content

fix: Fixed some paths/imports to handle the OpenDb->odb name change. …#2375

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
openroadie:master
Oct 16, 2022
Merged

fix: Fixed some paths/imports to handle the OpenDb->odb name change. …#2375
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
openroadie:master

Conversation

@openroadie
Copy link
Copy Markdown
Contributor

…TCL/python regressions work now (fail after #7 due to a different issue)

Signed-off-by: Harsh Vardhan openroad@chez-vardhan.com

…TCL/python regressions work now (fail after The-OpenROAD-Project#7 due to a different issue)

Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
@openroadie openroadie self-assigned this Oct 15, 2022
@openroadie
Copy link
Copy Markdown
Contributor Author

@maliberty @vvbandeira Decided to keep it simple and closed the other request. I hope this looks more reasonable. odb python/TCL regressions are working for me after these changes (they did not before).

Copy link
Copy Markdown
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macd FYI

@macd
Copy link
Copy Markdown
Collaborator

macd commented Oct 18, 2022

So the renaming of opendbpy to odbpy works OK with the stand alone exe in build/src/odb/src/swig/python/odbpy but it does not work with using openroad -python. There we must use import odb, (which I prefer). I also believe we should be testing openroad -python. I would like to move to pytest, and I can make these changes at that time, if you like.

@openroadie
Copy link
Copy Markdown
Contributor Author

openroadie commented Oct 18, 2022 via email

@macd
Copy link
Copy Markdown
Collaborator

macd commented Oct 18, 2022

Sounds good!

@openroadie
Copy link
Copy Markdown
Contributor Author

openroadie commented Oct 19, 2022

@macd I tried to run openedroad -python and this is what I got:

root@35bcee6f5ff2:/store/work/harsh/OpenROAD# ./build/src/openroad -python
OpenROAD a1a6cfdba39fd00ecd439ca0b8158e7fcda4725b 
This program is licensed under the BSD-3 license. See the LICENSE file for details.
Components of this program may be licensed under more restrictive licenses which must be honored.
[WARNING ORD-0039] .openroad ignored with -python
**[WARNING ORD-0040] cannot open: '-python'**
Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

Looking through the code I also see:

src/odb/test/unitTestsPython/TestBTerm.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestBlock.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestDestroy.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestGroup.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestITerm.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestInst.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestModule.py:import opendbpy as odb
src/odb/test/unitTestsPython/TestNet.py:import opendbpy as odb
grep: src/pad/test/caravel_sky130/lef: Is a directory
grep: src/pad/test/caravel_sky130/lib: Is a directory
src/odb/test/unitTestsPython/TestWireCodec.py:import opendbpy as odb
src/odb/test/unitTestsPython/helper.py:import opendbpy as odb

I could definitely use some help on how to see the problem you are describing.

@maliberty
Copy link
Copy Markdown
Member

[WARNING ORD-0040] looks to be surprious. @proppy is this due to your recent change?

You should be at the OR prompt with a python interpreter.

@macd
Copy link
Copy Markdown
Collaborator

macd commented Oct 19, 2022

Hmm, is there a separate OR prompt? I haven't seen that but I have seen the ORD-0040 error, but just discounted it. I usually just get the Python prompt. This is what I see on then trying to import odbpy

OpenROAD v2.0-5310-g2680091f3 
This program is licensed under the BSD-3 license. See the LICENSE file for details.
Components of this program may be licensed under more restrictive licenses which must be honored.
[WARNING ORD-0039] .openroad ignored with -python
[WARNING ORD-0040] cannot open: '-python'
Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import odbpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'odbpy'

However, importing odb works just fine here.

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

Successfully merging this pull request may close these issues.

3 participants