klayout-vector-file-export-cli 0.3__tar.gz → 0.5__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.3 → klayout_vector_file_export_cli-0.5}/PKG-INFO +1 -1
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/klayout_vector_export/cli_wrapper.py +24 -5
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/klayout_vector_export/version.py +1 -1
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/pyproject.toml +1 -1
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/LICENSE +0 -0
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/README.md +0 -0
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/klayout_vector_export/__init__.py +0 -0
- {klayout_vector_file_export_cli-0.3 → klayout_vector_file_export_cli-0.5}/klayout_vector_export/__main__.py +0 -0
|
@@ -258,7 +258,24 @@ class CLIWrapper:
|
|
|
258
258
|
args = parser.parse_args(sys.argv[1:])
|
|
259
259
|
|
|
260
260
|
settings = args_to_settings(args)
|
|
261
|
-
|
|
261
|
+
|
|
262
|
+
# Infer --format from --out suffix, or warn when they mismatch
|
|
263
|
+
if args.output_path is not None:
|
|
264
|
+
from vector_file_export_settings import VectorFileFormat
|
|
265
|
+
out_suffix = Path(args.output_path).suffix # e.g. '.pdf'
|
|
266
|
+
if args.file_format is None:
|
|
267
|
+
try:
|
|
268
|
+
settings.file_format = VectorFileFormat(out_suffix.lstrip('.'))
|
|
269
|
+
debug(f" ℹ Inferred --format={out_suffix.lstrip('.')} from output file suffix")
|
|
270
|
+
except ValueError:
|
|
271
|
+
pass # unknown suffix, will be caught by validation or use default
|
|
272
|
+
else:
|
|
273
|
+
expected_suffix = settings.file_format.suffix # e.g. '.pdf' (from @property)
|
|
274
|
+
if out_suffix.lower() != expected_suffix.lower():
|
|
275
|
+
print(f"WARNING: Output file suffix '{out_suffix}' does not match "
|
|
276
|
+
f"specified format '{settings.file_format.value}' "
|
|
277
|
+
f"(expected suffix '{expected_suffix}')")
|
|
278
|
+
|
|
262
279
|
errors = []
|
|
263
280
|
|
|
264
281
|
if args.input_path is None:
|
|
@@ -300,11 +317,13 @@ class CLIWrapper:
|
|
|
300
317
|
|
|
301
318
|
debug(f" ✔ Settings written to temp file: {settings_path}")
|
|
302
319
|
|
|
303
|
-
#
|
|
304
|
-
#
|
|
305
|
-
#
|
|
320
|
+
# NOTE: we no longer do this, as it hindered us to find the technologies!
|
|
321
|
+
# this error could be reproduced on IIC-OSIC-TOOLS
|
|
322
|
+
#
|
|
323
|
+
# Set KLAYOUT_PATH="" to prevent KLayout from reading any config files
|
|
324
|
+
# from additional search paths.
|
|
306
325
|
klayout_env = os.environ.copy()
|
|
307
|
-
klayout_env["KLAYOUT_PATH"] = ""
|
|
326
|
+
# klayout_env["KLAYOUT_PATH"] = ""
|
|
308
327
|
|
|
309
328
|
try:
|
|
310
329
|
# 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.5"
|
|
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
|