klayout-vector-file-export-cli 0.2__tar.gz → 0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/PKG-INFO +1 -1
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/klayout_vector_export/cli_wrapper.py +25 -10
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/klayout_vector_export/version.py +1 -1
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/pyproject.toml +1 -1
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/LICENSE +0 -0
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/README.md +0 -0
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/klayout_vector_export/__init__.py +0 -0
- {klayout_vector_file_export_cli-0.2 → klayout_vector_file_export_cli-0.4}/klayout_vector_export/__main__.py +0 -0
|
@@ -245,16 +245,20 @@ class CLIWrapper:
|
|
|
245
245
|
sys.exit(0)
|
|
246
246
|
|
|
247
247
|
from cli_args import build_parser, args_to_settings, validate_settings
|
|
248
|
+
|
|
249
|
+
try:
|
|
250
|
+
from cli_args import CLIArgumentValidationError
|
|
251
|
+
except ImportError:
|
|
252
|
+
# for compatibility with older plugin versions,
|
|
253
|
+
# declare a fallback that prints whatever the exception carries
|
|
254
|
+
class CLIArgumentValidationError(Exception):
|
|
255
|
+
pass
|
|
256
|
+
|
|
248
257
|
parser = build_parser()
|
|
249
258
|
args = parser.parse_args(sys.argv[1:])
|
|
250
259
|
|
|
251
260
|
settings = args_to_settings(args)
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
debug("=" * 60)
|
|
255
|
-
debug("Call KLayout")
|
|
256
|
-
debug("=" * 60)
|
|
257
|
-
|
|
261
|
+
|
|
258
262
|
errors = []
|
|
259
263
|
|
|
260
264
|
if args.input_path is None:
|
|
@@ -266,9 +270,18 @@ class CLIWrapper:
|
|
|
266
270
|
if args.technology is None:
|
|
267
271
|
errors += [f"ERROR: Technology is missing, please provide command line argument --tech / -t"]
|
|
268
272
|
|
|
273
|
+
try:
|
|
274
|
+
validate_settings(settings)
|
|
275
|
+
except CLIArgumentValidationError as e:
|
|
276
|
+
errors += e.errors if hasattr(e, 'errors') else list(e.args)
|
|
277
|
+
|
|
269
278
|
if errors:
|
|
270
279
|
print('\n'.join(errors))
|
|
271
280
|
sys.exit(1)
|
|
281
|
+
|
|
282
|
+
debug("=" * 60)
|
|
283
|
+
debug("Call KLayout")
|
|
284
|
+
debug("=" * 60)
|
|
272
285
|
|
|
273
286
|
input_path = Path(args.input_path).resolve()
|
|
274
287
|
|
|
@@ -287,11 +300,13 @@ class CLIWrapper:
|
|
|
287
300
|
|
|
288
301
|
debug(f" ✔ Settings written to temp file: {settings_path}")
|
|
289
302
|
|
|
290
|
-
#
|
|
291
|
-
#
|
|
292
|
-
#
|
|
303
|
+
# NOTE: we no longer do this, as it hindered us to find the technologies!
|
|
304
|
+
# this error could be reproduced on IIC-OSIC-TOOLS
|
|
305
|
+
#
|
|
306
|
+
# Set KLAYOUT_PATH="" to prevent KLayout from reading any config files
|
|
307
|
+
# from additional search paths.
|
|
293
308
|
klayout_env = os.environ.copy()
|
|
294
|
-
klayout_env["KLAYOUT_PATH"] = ""
|
|
309
|
+
# klayout_env["KLAYOUT_PATH"] = ""
|
|
295
310
|
|
|
296
311
|
try:
|
|
297
312
|
# NOTE: we do not pass -nc, as it would hinder us to find the technology
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "klayout-vector-file-export-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.4"
|
|
4
4
|
description = "Vector File Export CLI Tool for KLayout"
|
|
5
5
|
authors = ["Martin Köhler <info@martinjankoehler.com>"]
|
|
6
6
|
homepage = "https://github.com/iic-jku/klayout-vector-file-export-cli/"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|