Overview
| Comment: | decoding fixes for pyinstaller/win setups, default on PluginMeta() for unreadable modules |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
c996a868e25aa107fd7137ea105ec61e |
| User & Date: | mario on 2022-11-12 22:58:20 |
| Other Links: | manifest | tags |
Context
|
2023-10-26
| ||
| 21:45 | precautionarily rewrap PluginMeta (for e.g. manually constructed plugins={} list) check-in: 8082a94a20 user: mario tags: trunk | |
|
2022-11-12
| ||
| 22:58 | decoding fixes for pyinstaller/win setups, default on PluginMeta() for unreadable modules check-in: c996a868e2 user: mario tags: trunk | |
| 15:25 | introduce plugin_icon() for gui window check-in: 64c2c60322 user: mario tags: trunk | |
Changes
Modified pluginconf/__init__.py from [1b5dd2ab14] to [b93e156971].
| ︙ | |||
292 293 294 295 296 297 298 | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + + + + - + + + |
search = plugin_base + kwargs.get("extra_base", [])
for base, sfx in itertools.product(search, [".py", "/__init__.py"]):
try:
#log.debug(f"mod={base} fn={filename}.py")
src = get_data(filename=module+sfx, decode=True, file_root=base, warn=False)
if src:
break
|
| ︙ | |||
346 347 348 349 350 351 352 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + - + |
| src | str | from existing source code |
| filename | str | set filename attribute |
| literal | bool | just split comment from doc |
| **Returns** | dict | fields |
"""
# Defaults
|
| ︙ | |||
380 381 382 383 384 385 386 | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | - + |
src, meta["doc"] = src.split("\n\n", 1)
# Turn key:value lines into dictionary
for field in rx.keyval.findall(src):
meta[field[0].replace("-", "_").lower()] = field[1].strip()
meta["config"] = plugin_meta_config(meta.get("config") or "")
|
| ︙ |