Skip to content
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

running ruby (drc) macro from standalone python module #1772

Open
tvt173 opened this issue Jul 5, 2024 · 2 comments
Open

running ruby (drc) macro from standalone python module #1772

tvt173 opened this issue Jul 5, 2024 · 2 comments
Labels

Comments

@tvt173
Copy link

tvt173 commented Jul 5, 2024

hi,

I was wondering if there was a way to make this work or if it is currently not possible:

    import klayout.lay as klay
    import klayout.tl as ktl

    macro_name = "my_rules.drc"
    macro = klay.Macro(macro_name)
    interpreter = ktl.Interpreter.ruby_interpreter()  # returns None
    macro.interpreter = interpreter  # throws RuntimeError
    macro.run()

I know that I can do this by running the macro via the klayout cli, in a python Subprocess. but I noticed that this (more convenient) method already seems to exist in the python API, though I couldn't get it to work. i'm suspecting that this functionality doesn't ship with the standalone python installation, but i thought i'd double check. thanks!

@klayoutmatthias
Copy link
Collaborator

Hi @tvt173,

you can't do that. DRC needs Ruby and I did not package Ruby with Python modules for obvious reasons :)

Matthias

@tvt173
Copy link
Author

tvt173 commented Jul 5, 2024

That's what I figured. Thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants