Sometimes an environment may need additional tweaks after deployment (e.g. fixing up absolute paths in data files, regenerating console entry point wrappers).
This issue covers designing and implementing a mechanism to support that.
For example, perhaps the layer specs could all gain a postinstall_script relative path field (similar to launch_module, but as a full Python script name), that gets copied to _postinstall_customize.py (adjacent to postinstall.py), which the generated postinstall.py runs with runpy.run_path(pathlib.Path(__file__).parent / "_postinstall_customize.py"). (To allow use of zipapp files, the extension on the specified script should be preserved)
Sometimes an environment may need additional tweaks after deployment (e.g. fixing up absolute paths in data files, regenerating console entry point wrappers).
This issue covers designing and implementing a mechanism to support that.
For example, perhaps the layer specs could all gain a
postinstall_script
relative path field (similar tolaunch_module
, but as a full Python script name), that gets copied to_postinstall_customize.py
(adjacent topostinstall.py
), which the generatedpostinstall.py
runs withrunpy.run_path(pathlib.Path(__file__).parent / "_postinstall_customize.py")
. (To allow use ofzipapp
files, the extension on the specified script should be preserved)