Masquerading As Other Packaging Tools¶
Tools to package and distribute Python applications existed several
PyOxidizer. Many Python packages have learned to perform
special behavior when the _fingerprint* of these tools is detected at
PyOxidizer has its own fingerprint:
sys.oxidized = True. The
presence of this attribute can indicate an application running with
PyOxidizer. Other applications are discouraged from defining this
PyOxidizer’s run-time behavior is similar to other packaging
PyOxidizer supports falsely identifying itself as these other
tools by emulating their fingerprints.
PythonInterpreterConfig.sys_frozen controls whether
sys.frozen = True is set. This can allow
PyOxidizer to advertise
itself as a frozen application.
In addition, the
PythonInterpreterConfig.sys_meipass boolean flag
controls whether a
sys._MEIPASS = <exe directory> attribute is set. This
PyOxidizer to masquerade as having been built with PyInstaller.
Masquerading as other packaging tools is effectively lying and can
be dangerous, as code relying on these attributes won’t know if
it is interacting with
PyOxidizer or some other tool. It is
recommended to only set these attributes to unblock enabling
packages to work with
PyOxidizer until other packages learn to
sys.oxidized = True. Setting
definitely the more risky option, as a case can be made that
PyOxidizer should set
sys.frozen = True by default.