Bundle Yamale schema

TIL! Using the existence of obscure member sys._MEIPASS, I can detect if
we're running from a bundled PyInstaller binary, versus running from Python
directly.

Add schema.yaml to the datas of the PyInstaller spec. Then, if the
-/--schema flag is given, use it, and if it's not given, default to the
built-in one if we're running from a bundled binary, or fall-through to
./schema.yaml in other cases.

This avoids the need for config/schema.py as a carbon-copy of the schema,
slick!
This commit is contained in:
Pim van Pelt
2022-04-05 12:40:05 +00:00
parent fdb732142a
commit 289138da94
5 changed files with 25 additions and 95 deletions

View File

@ -4,10 +4,12 @@
block_cipher = None
added_files = [ ( 'schema.yaml', '.') ]
a = Analysis(['vppcfg'],
pathex=['/home/pim/src/vppcfg'],
binaries=[],
datas=[],
datas=added_files,
hiddenimports=[],
hookspath=[],
hooksconfig={},