Skip to content

Commit

Permalink
Update GSiP_Library.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Feb 11, 2024
1 parent 5e9dc54 commit b522593
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions klayout_dot_config/tech/GSiP/pymacros/GSiP_Library.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@

import os, sys, pathlib

import SiEPIC
dir_path = os.path.dirname(os.path.realpath(__file__))
if dir_path not in sys.path:
sys.path.append(dir_path)

try:
import SiEPIC
except:
dir_path_SiEPIC = os.path.join(dir_path, '../../../python')
sys.path.append(dir_path_SiEPIC)
import SiEPIC

from SiEPIC._globals import KLAYOUT_VERSION, KLAYOUT_VERSION_3
if KLAYOUT_VERSION < 28:
Expand All @@ -49,11 +58,6 @@
question.setInformativeText("\nThis PDK is not compatible with older versions (<0.28) of KLayout.\nPlease download an install the latest version, from %s" % (KLayout_link0))
pya.QMessageBox_StandardButton(question.exec_())


dir_path = os.path.dirname(os.path.realpath(__file__))
if dir_path not in sys.path:
sys.path.append(dir_path)

files = [f for f in os.listdir(os.path.join(os.path.dirname(
os.path.realpath(__file__)),folder)) if '.py' in pathlib.Path(f).suffixes and '__init__' not in f]
import importlib
Expand Down

0 comments on commit b522593

Please sign in to comment.