-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow usage in klayout embedded python #53
Comments
I think it is within the scope that we can make this happen. I think the main issue being the imports. But I can see that with the following solution: try:
import klayout.dbcore as kdb
import klayout.lay as lay
except ImportError:
logger.warning("Cannot find klayout modules dbcore and lay, trying to import klayout packages")
else:
import pya as kdb
import pya as lay
Yes, pya contains both and more (such as Qt objects)
We can do that. |
we are in the process of evaluation kfactory as the backend for gdsfactory Now that kfactory supports complex cells we could fully support all gdsfactory features |
@proppy is this still something you'd be interested in? I think we could implement a stripped down version kfactory for this, but I think with the current dependencies, some of then deeply rooted in the code, I won't be able to support a simply try/except import of klayout/pya I'd also be interested in helping make klayout more portable i.e. having it compiled against conda envs, so that on all platforms a conda env would be able to install the GUI from a conda channel like you did already for one platform |
@sebastian-goeldi, sorry for the late follow-up. I think @atorkmabrains would definitly be interested to use something like this for: |
for conda-env, we already maintain some conda packages for klayout (w/ GUI) in this channel: It would be nice to have them part of conda-forge as well, there was some work done toward that in: |
@proppy I think this is at the moment not realistic, a big part of kfactory depends on pydantic and it's at least at the moment evolving too fast to request klayout to keep pace with that on the windows builds. So for this to work, I think we would still need a conda installation method at the very least for windows, which is not great, but possible. We could make use of the 0.28.13 addition of git+https:// support and host a separate saltmine on a github projects gitthub.io page (which transparently includes the standard saltmine as well) and then offer kfactory on that saltmine. I think that would be the most reasonable approach. |
you mean evolving in backward incompatible way? I would have to assume that in order to be "embedded" in klayout built-in python environment, one would have to bundle all the dependencies in the klayout salt package. |
Would re-using
kfactory
component model when implementing klayout pcells for interactive usage (inside klayout gui) be within the scope of the project?Context is the discussion about a recent refactoring of open source PDKs pcells in efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr#28
A few question toward this:
rectangle
,boolean
ops, etc)KCell
just work on top ofpya
instead ofklayout.db/lay
kfactory/src/kfactory/__init__.py
Lines 6 to 7 in 1bcdc79
Let me know what you think!
The text was updated successfully, but these errors were encountered: