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:
@ -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={},
|
||||
|
Reference in New Issue
Block a user