Changelog for PyInstaller¶
5.13.2 (2023-08-29)¶
Bugfix¶
(Windows) Fix
OSError: exception: access violation reading 0x00000010raised bymatplotlibandwin32comrun-time hooks when ran in 32-bit frozen application (regression introduced inv5.13.1). (#7893)
5.13.1 (2023-08-26)¶
Security¶
(Windows) Ensure that the access to temporary directories created by the
matplotlibandwin32comrun-time hooks is restricted to the user running the frozen application, even if the directory in theTMPorTEMPvariables points to a system-wide world writable location that can be accessed by all users. (#7827)
Bugfix¶
(macOS) Fix
pkgutil.iter_modules()failing to find submodules of a package that contains data files when running as a macOS .app bundle. (#7884)(Windows) Fix
win32comrun-time hook to fully isolate thegen_pycache. This prevents access to the global cache, which results in errors when the global cache contains some, but not all, required modules. (#6257)(Windows) Fix splash screen not being able to locate collected Tk resources in onefile applications created in MSYS2 python environment. (#7828)
(Windows) Fixed bug where GdkPixbuf loaders.cache dll paths are absolute paths (e.g.
C:/tools/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll) and not relative paths (e.g.lib\\gdk-pixbuf\\loaders\\libpixbufloader-png.dll) when the file is generated in the MSYS2/mingw64 environment. This results in the program crashing when run on another Windows machine because it cannot find the GdkPixbuf loader DLLs. (#7842)Exclude NVIDIA graphics driver libraries from vendoring. (#7746)
Fix error handling in Glib schema compilation helper function. Ignore character encoding errors when reading stdout/stderr from
glib-schema-compileprocess; this fixes errors in MSYS2/mingw64 environment, caused byU+201CandU+201Dquotation marks in the output. (#7833)Implement a work-around for un-initialized
sys._stdlib_dirand ensure that python-frozen stdlib modules in Python >= 3.11 have__file__attribute set. (#7847)
Bootloader¶
Have bootloader call
Py_GetPath()beforePy_SetPath()on all platforms (instead of just on Windows) to work around memory-initialization issues in python 3.8 and 3.9, which come to light withPYTHONMALLOC=debugorPYTHONDEVMODE=1being set in the environment. (#7790)
5.13.0 (2023-06-24)¶
Features¶
Bugfix¶
Limit the import of collected packages prior to performing binary dependency analysis to only Windows, where it is actually useful. On non-Windows platforms, there is no benefit to it, and it might cause issues with particular orders of package imports. (#7698)
When building PKG for
onedirbuild, ensure thatDATAentries are put into dependencies list instead of including them in the PKG. This complements existing behavior forBINARYandEXTENSIONentries, and prevents aonedirbuild from becoming a brokenonefileone if user accidentally passes binaries and data files TOCs toEXEinstead of COLLECT when manually editing the spec file. (#7708)
5.12.0 (2023-06-08)¶
Features¶
(macOS) PyInstaller now removes all rpaths from collected binaries and replaces them with a single rpath pointing to the top-level application directory, relative to
@loader_path. (#7664)Attempt to preserve the parent directory layout for
pywin32extensions that originate fromwin32andpythonwindirectories, instead of collecting those extensions to top-level application directory. (#7627)
Bugfix¶
(Linux/macOS) Fix the Qt directory path override in
PySide2andPySide6run-time hooks. These paths, set viaQT_PLUGIN_PATHandQML2_IMPORT_PATHenvironment variables, are used withPySide2andPySide6builds that that use system-wide Qt installation and are not portable by default (e.g., Homebrew). (#7649)(macOS) When rewriting the dylib identifier and paths to linked libraries in a collected binary, instead of directly using
@loader_path-based path, use@rpath-based path and replace rpaths in the binary with a single rpath that points to the top-level application directory, relative to@loader_path. This ensures that the library identifiers of collected shared libraries and their references in referring binaries always match, which allows packages to pre-load a library from an arbitrary location via for examplectypes. (#7664)(Windows) Fix string serialization of
VSVersionInfoto account for the possibility ofStringStructvalues containing quote characters. (#7630)Attempt to fix compatibility of PyInstaller’s
PyiFrozenImporterwithimportlib.util.LazyLoader. (#7657)Attempt to mitigate issues with Anaconda
pywin32package that result from the package installing three copies ofpywintypes3X.dllandpythoncom3X.dllin different locations. (#7627)Changes made to
datasandbinarieslists that are passed toAnalysisconstructor will now invalidate the cachedAnalysisand trigger a re-build. This applies both to changes made by editing the .spec file manually and to automatic changes due to addition or removal of corresponding command-line options (--add-data,--add-binary,--collect-data,--collect-binaries,--copy-metadata). Previously, changes might not have taken effect as the old cached build was returned if available and unless user explicitly requested a clean build using the--cleancommand-line option. (#7653)Ensure that
qt_{lang}translation files are collected with theQtCoremodule, in addition to already-collectedqtbase_{lang}files. Applies to all four Qt-bindings:PySide2,PySide6,PyQt5, andPyQt6. (#7682)Fix
ModuleNotFoundError: No module named 'ipaddress'for any application built with Python >=3.11.4. (#7692)Fix splash-enabled program crashing due to NULL-pointer dereference in the bootloader when the Tcl/Tk shared libraries cannot be loaded. The program should now run the user’s python code, where it will raise an exception if the
pyi_splashmodule is used. (#7679)Implement proper binary dependency scanning in the
SPLASHtarget, so that binary dependencies of the Tcl and Tk shared libraries are always collected and added to the list of splash requirements (for pre-extraction in onefile builds). This fixes the splash screen when building with Windows build of python.org Python 3.12b1, which ships Tcl shared library with new dependency onzlib1.dll. (#7679)
PyInstaller Core¶
(macOS) Use macOS-provided
install_name_toolutility to modify headers on collected binaries: change the dylib identifier to@rpath/<name>.dylib, rewrite paths to linked non-system shared libraries to@rpath/<dependency>, remove any additional rpaths and add an rpath pointing to the application’s top-level directory, relative to the@loader_path. Previously, the header modification was performed usingmacholiband was limited only to modification of dylib identifier and paths to linked non-system shared libraries. (#7664)
5.11.0 (2023-05-13)¶
Features¶
Add a work-around for pure-python modules that do not specify encoding via PEP 263 encoding header but contain non-ASCII characters in local (non-UTF8) encoding. When such characters are present only in code comments, python still loads and runs the module, but attempting to retrieve its source code via the loader’s
get_source()method results in aUnicodeDecodeError, which interrupts the analysis process. The error is now caught and a fall-back codepath attempts to retrieve the source code as raw data to avoid encoding issues. (#7622)
Bugfix¶
(Windows) Avoid writing collected binaries to binary cache unless they need to be processed (i.e., only if binary stripping or
upxprocessing is enabled). (#7595)Fix a regression in bootloader that caused crash in onefile executables when encountering a duplicated entry in the PKG/CArchive and the
PYINSTALLER_STRICT_UNPACK_MODEenvironment variable not being set. (#7613)
Deprecations¶
The
TOCclass is now deprecated; use a plainlistwith the same three-element tuples instead. PyInstaller now performs explicit normalization (i.e., entry de-duplication) of the TOC lists passed to the build targets (e.g.,PYZ,EXE,COLLECT) during their instantiation. (#7615)
Bootloader¶
Fix bootloader building with old versions of
gccthat do not support the-Wno-error=unused-but-set-variablecompiler flag (e.g.,gccv4.4.3). (#7592)
Documentation¶
Update the documentation on TOC lists and
Treeclass to reflect the deprecation of theTOCclass. (#7615)
PyInstaller Core¶
Remove the use of the
TOCclass in the analysis / build process, and use plainlistinstances instead. The implicit normalization (de-duplication) of TOC entries performed by theTOCclass has been replaced with explicit normalization. The TOC lists produced byAnalysisare explicitly normalized at the end of Analysis instantiation, before they are stored in the Analysis properties (e.g.,Analysis.pure,Analysis.binaries,Analysis.datas). Similarly, the TOC lists passed to the build targets (e.g.,PYZ,EXE,COLLECT) are explicitly normalized as part of the targets’ instantiation process. (#7615)
5.10.1 (2023-04-14)¶
Bugfix¶
Fix regression on platforms with strict data alignment requirements (such as linux on
armhf/armv7), caused by bug in PKG/CArchive generation that was introduced during the archive writer code cleanup. The regression caused executable to terminate withBus erroron the affected platforms, such as 32-bit Debian Buster on Raspberry Pi 4. (#7566)
5.10.0 (2023-04-11)¶
Bugfix¶
(Linux) Ignore the executable name resolution based on
/proc/self/exewhen the PyInstaller-frozen executable is launched via theld.sodynamic loader executable. In such cases, the resolved name points to theld.soexecutable, causing the PyInstaller-frozen executable to fail with Cannot open PyInstaller archive from executable… error. (#7551)Ensure that binaries that are manually specified in the .spec file (or via corresponding
--add-binaryor--collect-binariescommand-line switches) undergo the binary dependency analysis, so their dependencies are automatically collected. (#7522)Extend the
excludedimportsmechanism rework from #7066 to properly handle relative imports within the package. For example, ensure thatexcludedimports = ['a.b']within the hook for packageatakes effect when packageadoesfrom . import b(in addition tofrom a import b). (#7495)Extend the
excludedimportsmechanism rework from #7066 to properly handle the case of multiple submodules being imported in a singlefrom ... import ...statement (using absolute or relative import). For example, when packagecdoesfrom d import e, f, we need to consider potentialexcludedimportsrules matching packagedand, ifditself is not excluded, potential rules individually matchingd.eandd.f. (#7495)Fix marshal error in binary dependency search stage, caused by the list of collected packages containing a
modulegraph.Aliasinstance instead of only plainstrinstances. (#7515)Reorganize the
multiprocessingrun-time hook to overridePopenimplementations only forspawnandforkserverstart methods, but not for theforkstart method. This avoids a dead-lock when attempting to perform nested multiprocessing using theforkstart method, which occurred due to override-provided lock (introduced in #7411) being copied in its locked state into the forked sub-process. (#7494)
Incompatible Changes¶
The
archive_viewerutility has been rewritten with modified command-line interface (--loghas been renamed to--list) and with changed output formatting. (#7518)
Hooks¶
(Windows) Improve support for
matplotlib >= 3.7.0by collecting alldelvewheel-generated files from thematplotlib.libsdirectory, including the load-order file. This is required when PyPImatplotlibwheels are used in combination with Anaconda python 3.8 and 3.9. (#7503)Add hook for
PyQt6.QtSpatialAudiomodule, which was added inPyQt66.5.0. (#7549)Add hook for
PyQt6.QtTextToSpeechmodule, which was added inPyQt66.4 series. (#7549)Extend
PySide6hooks forPySide66.5.0 compatibility: add hooks forQtLocation,QtTextToSpeech, andQtSerialBusmodules that were introduced inPySide6.5.0. (#7549)
5.9.0 (2023-03-13)¶
Features¶
Choose hooks provided by packages over hooks from pyinstaller-hooks-contrib if both provide the same hook. (#7456)
Bugfix¶
Fix changes to
sys.pathmade in the spec file being ignored by hook utility functions (e.g.collect_submodules()). (#7456)
5.8.0 (2023-02-11)¶
Features¶
Compile the collected GLib schema files using
glib-schema-compilerinstead of collecting the pre-compiledgschemas.compiledfile, in order to properly support collection of schema files from multiple locations. Do not collect the source schema files anymore, as onlygschemas.compiledfile should be required at run time. (#7394)
Bugfix¶
(Cygwin) Avoid using Windows-specific codepaths that require
pywin32-ctypesfunctionality that is not available in Cygwin environment. (#7382)(non-Windows) Fix race condition in environment modification done by
multiprocessingruntime hook when multiple threads concurrently spawn processes using thespawnmethod. (#7410)(Windows) Changes in the version info file now trigger rebuild of the executable file. (#7338)
Disallow empty source path in the
binariesanddatastuples that are returned from the hooks and sanitized in thePyInstaller.building.utils.format_binaries_and_datas. The empty source path is usually result of an error in the hook’s path retrieval code, and causes implicit collection of the whole current working directory. This is never the intended behavior, so raise aSystemExit. (#7384)Fix unknown log level error raised with
--log-level=DEPRECATION. (#7413)
Incompatible Changes¶
The deprecated
PEP-302find_module()andload_module()methods have been removed from PyInstaller’sFrozenImporter. These methods have not been used by python’s import machinery since python 3.4 andPEP-451, and were effectively left untested and unmaintained. The removal affects 3rd party code that still relies onPEP-302finder/loader methods instead of thePEP-451ones. (#7344)
Hooks¶
5.7.0 (2022-12-04)¶
Features¶
Add the package’s location and exact interpreter path to the error message for the check for obsolete and PyInstaller-incompatible standard library back-port packages (
enum34andtyping). (#7221)Allow controlling the build log level (
--log-level) via aPYI_LOG_LEVELenvironment variable. (#7235)Support building native ARM applications for Windows. If PyInstaller is ran on an ARM machine with an ARM build of Python, it will prodice an ARM application. (#7257)
Bugfix¶
(Anaconda) Fix the
PyInstaller.utils.hooks.conda.collect_dynamic_libshook utility function to collect only dynamic libraries, by introducing an additional type check (to exclude directories and symbolic links to directories) and additional suffix check (to include only files whose name matches the following patterns:*.dll,*.dylib,*.so, and*.so.*). (#7248)(Anaconda) Fix the problem with Anaconda python 3.10 on linux and macOS, where all content of the environment’s
libdirectory would end up collected as data due to additional symbolic link pointing frompython3.1topython3.10. (#7248)(GNU/Linux) Fixes an issue with gi shared libraries not being packaged if they don’t have version suffix and are in a special location set by
LD_LIBRARY_PATHinstead of a typical library path. (#7278)(Windows) Fix the problem with
windowedfrozen application being unable to spawn interactive command prompt console viasubprocessmodule due to interference of thesubprocessruntime hook with stream handles. (#7118)(Windows) In
windowed/noconsolemode, stop settingsys.stdoutandsys.stderrto customNullWriterobject, and instead leave them atNone. This matches the behavior of windowed python interpreter (pythonw.exe) and prevents interoperability issues with code that (rightfully) expects the streams to be eitherNoneor objects that are fully compatible withio.IOBase. (#3503)Ensure that
PySide6.support.deprecatedmodule is collected forPySide66.4.0 and later in order to enable continued support for|and&operators between Qt key and key modifier enum values (e.g.,QtCore.Qt.Key_DandQtCore.Qt.AltModifier). (#7249)Fix potential duplication of python extension modules in
onefilebuilds, which happened when an extension was collected both as anEXTENSIONand as aDATA(or aBINARY) TOC type. This resulted in run-time warnings about files already existing; the most notorious example beingWARNING: file already exists but should not: C:\Users\user\AppData\Local\Temp\MEI1234567\torch\_C.cp39-win_amd64.pydwhen buildingonefileapplications that usetorch. (#7273)Fix spurious attempt at reading the
top_level.txtmetadata from packages installed in egg form. (#7086)Fix the log level (provided via
--log-level) being ignored by some build steps. (#7235)Fix the problem with
MERGEnot properly cleaning up passedAnalysis.binariesandAnalysis.datasTOCs due to changes made toTOCclass in PyInstaller 5.0. This effectively broke the supposed de-duplication functionality ofMERGEand multi-package bundles, which should be restored now. (#7273)Prevent
$pythonprefix/binfrom being added tosys.pathwhen PyInstaller is invoked usingpyinstaller your-code.pybut not usingpython -m PyInstaller your-code.py. This prevents collection mismatch when a library has the same name as console script. (#7120)Prevent isolated-subprocess calls from indefinitely blocking in their clean-up codepath when the subprocess fails to exit. After the grace period of 5 seconds, we now attempt to terminate such subprocess in order to prevent hanging of the build process. (#7290)
Incompatible Changes¶
(Windows) In
windowed/noconsolemode, PyInstaller does not setsys.stdoutandsys.stderrto customNullWriterobject anymore, but leaves them atNone. The new behavior matches that of the windowed python interpreter (pythonw.exe), but may break the code that usessys.stdoutorsys.stderrwithout first checking that they are available. The code intended to be run frozen inwindowed/noconsolemode should be therefore be validated using the windowed python interpreter to catch errors related to console being unavailable. (#7216)
Deprecations¶
Deprecate bytecode encryption (the
--keyoption), to be removed in PyInstaller v6.0. (#6999)
Hooks¶
(Windows) Remove the
subprocessruntime hook. The problem with invalid standard stream handles, which caused thesubprocessmodule raise anOSError: [WinError 6] The handle is invaliderror in awindowedonefilefrozen application when trying to spawn a subprocess without redirecting all standard streams, has been fixed in the bootloader. (#7182)Ensure that each
Qt*submodule of thePySide2,PyQt5,PySide6, andPyQt6bindings has a corresponding hook, and can therefore been imported in a frozen application on its own. Applicable to the latest versions of packages at the time of writing:PySide2 == 5.15.2.1,PyQt5 == 5.15.7,PySide6 == 6.4.0, andPyQt6 == 6.4.0. (#7284)Improve compatibility with contemporary
Django4.x version by removing the override ofdjango.core.management.get_commandsfrom theDjangorun-time hook. The static command list override is both outdated (based onDjango1.8) and unnecessary due to dynamic command list being properly populated under contemporary versions ofPyInstallerandDjango. (#7259)Introduce additional log messages to
matplotlib.backendhook to provide better insight into what backends are selected and why when the detection ofmatplotlib.usecalls comes into effect. (#7300)
Bootloader¶
(Windows) In a
onefileapplication, avoid passing invalid stream handles (theINVALID_HANDLE_VALUEconstant with value-1) to the launched application child process when the standard streams are unavailable (for example, in a windowed/no-console application). (#7182)
Bootloader build¶
Support building ARM native binaries using MSVC using the command
python waf --target-arch=64bit-arm all. If built on an ARM machine,--target-arch=64bit-armis the default. (#7257)Windows ARM64 bootloaders may now be built using an ARM build of clang with
python waf --target-arch=64bit-arm --clang all. (#7257)
5.6.2 (2022-10-31)¶
Bugfix¶
(Linux, macOS) Fix the regression in shared library collection, where the shared library would end up collected under its fully-versioned .so name (e.g.,
libsomething.so.1.2.3) instead of its originally referenced name (e.g.,libsomething.so.1) due to accidental symbolic link resolution. (#7189)
5.6.1 (2022-10-25)¶
5.6 (2022-10-23)¶
Features¶
Add official support for Python 3.11. (Note that PyInstaller v5.5 is also expected to work but has only been tested with a pre-release of Python 3.11.) (#6783)
Implement a new hook utility function,
collect_delvewheel_libs_directory(), intended for dealing with external shared library indelvewheel-enabled PyPI wheels for Windows. (#7170)
Bugfix¶
(macOS) Fix OpenCV (
cv2) loader error in generated macOS .app bundles, caused by the relocation of package’s source .py files. (#7180)(Windows) Improve compatibility with
scipy1.9.2, whose Windows wheels switched todelvewheel, and therefore have shared libraries located in external .libs directory. (#7168)(Windows) Limit the DLL parent path preservation behavior from #7028 to files collected from site-packages directories (as returned by
site.getsitepackages()andsite.getusersitepackages()) instead of all paths insys.path, to avoid unintended behavior in corner cases, such assys.pathcontaining the drive root or user’s home directory. (#7155)Fix compatibility with
PySide66.4.0, where the deprecatedQml2ImportsPathlocation key is not available anymore; use the newQmlImportsPathkey when it is available. (#7164)Prevent PyInstaller runtime hook for
setuptoolsfrom attempting to overridedistutilswithsetuptools-provided version whensetuptoolsis collected and its version is lower than 60.0. This both mimics the unfrozen behavior and prevents errors on versions between 50.0 and 60.0, where we do not explicitly collectsetuptools._distutils. (#7172)
Incompatible Changes¶
(macOS) In generated macOS .app bundles, the collected source .py files are not relocated from
Contents/MacOStoContents/Resourcesanymore, to avoid issues when the path to a .py file is supposed to resolve to the same directory as adjacent binary extensions. On the other hand, this change might result in regressions w.r.t. bundle signing and/or notarization. (#7180)
5.5 (2022-10-08)¶
Bugfix¶
(Windows) Fix a regression introduced in PyInstaller 5.4 (#6925), where incorrect copy of
python3.dll(and consequently an additional, incorrect copy ofpython3X.dllfrom the same directory) is collected when additional python installations are present inPATH. (#7102)(Windows) Provide run-time override for
ctypes.util.find_librarythat searchessys._MEIPASSin addition to directories specified inPATH. (#7097)Fix the problem with
pywin32DLLs not being found when importingpywin32top-level extension modules, caused by the DLL directory structure preservation behavior introduced in #7028. Introduce a new bootstrap/loader module that adds thepywin32_system32directory, if available, to bothsys.pathand the DLL search paths, in lieu of having to provide a runtime hook script for every single top-level extension module frompywin32. (#7110)
5.4.1 (2022-09-11)¶
5.4 (2022-09-10)¶
Features¶
(Windows) When collecting a DLL that was discovered via link-time dependency analysis of a collected binary/extension, attempt to preserve its parent directory structure instead of collecting it into application’s top-level directory. This aims to preserve the parent directory structure of DLLs bundled with python packages in PyPI wheels, while the DLLs collected from system directories (as well as from
Library\bindirectory of the Anaconda’s environment) are still collected into top-level application directory. (#7028)Add support for
setuptools-provideddistutils, available sincesetuptools >= 60.0. (#7075)Implement a generic file filtering decision function for use in hooks, based on the source filename and optional inclusion and exclusion pattern list (
PyInstaller.utils.hooks.include_or_exclude_file()). (#7040)Rework the module exclusion mechanism. The excluded module entries, specified via
excludedimportslist in the hooks, are now used to suppress module imports from corresponding nodes during modulegraph construction, rather than to remove the nodes from the graph as a post-processing step. This should make the module exclusion more robust, but the main benefit is that we avoid running (potentially many and potentially costly) hooks for modules that would end up excluded anyway. (#7066)
Bugfix¶
(Windows) Attempt to extend DLL search paths with directories found in the PATH environment variable and by tracking calls to the os.add_dll_directory function during import of the packages in the isolated sub-process that performs the binary dependency scanning. (#6924)
(Windows) Ensure that ANGLE DLLs (
libEGL.dllandlibGLESv2.dll) are collected when using Anaconda-installedPyQt5andQt5. (#7029)Fix
AssertionErrorduring build when analysing a.pycfile containing more that 255 variable names followed by an import statement all in the same namespace. (#7055)
Incompatible Changes¶
(Windows) PyInstaller now attempts to preserve parent directory structure of DLLs that are collected from python packages (e.g., bundled with packages in PyPI wheels) instead of collecting them to the top-level application directory. This behavior might be incompatible with 3rd party hooks that assume the old behavior, and may result in duplication of DLL files or missing DLLs in hook-provided runtime search paths. (#7028)
Hooks¶
Implement new
gstreamerhook configuration group withinclude_pluginsandexclude_pluginsoptions that enable control over GStreamer plugins collected by thegi.repository.Gsthook. (#7040)Provide hooks for additional
gstreamermodules provided via GObject introspection (gi) bindings:gi.repository.GstAllocators,gi.repository.GstApp,gi.repository.GstBadAudio,gi.repository.GstCheck,gi.repository.GstCodecs,gi.repository.GstController,gi.repository.GstGL,gi.repository.GstGLEGL,gi.repository.GstGLWayland,gi.repository.GstGLX11,gi.repository.GstInsertBin,gi.repository.GstMpegts,gi.repository.GstNet,gi.repository.GstPlay,gi.repository.GstPlayer,gi.repository.GstRtp,gi.repository.GstRtsp,gi.repository.GstRtspServer,gi.repository.GstSdp,gi.repository.GstTranscoder,gi.repository.GstVulkan,gi.repository.GstVulkanWayland,gi.repository.GstVulkanXCB, andgi.repository.GstWebRTC. (#7074)
5.3 (2022-07-30)¶
Features¶
(Windows) Implement handling of console control signals in the
onefilebootloader parent process. The implemented handler suppresses theCTRL_C_EVENTandCTRL_BREAK_EVENTto let the child process deal with them as they see it fit. In the case ofCTRL_CLOSE_EVENT,CTRL_LOGOFF_EVENT, orCTRL_SHUTDOWN_EVENT, the handler attempts to delay the termination of the parent process in order to buy time for the child process to exit and for the main thread of the parent process to clean up the temporary directory before exiting itself. This should prevent the temporary directory of aonefilefrozen application being left behind when the user closes the console window. (#6591)Implement a mechanism for controlling the collection mode of modules and packages, with granularity ranging from top-level packages to individual sub-modules. Therefore, the hooks can now specify whether the hooked package should be collected as byte-compiled .pyc modules into embedded PYZ archive (the default behavior), or as source .py files collected as external data files (without corresponding modules in the PYZ archive). (#6945)
Bugfix¶
(non-Windows) Avoid generating debug messages in POSIX signal handlers, as the functions involved are generally not signal-safe. Should also fix the endless spam of
SIGPIPEthat ocurrs under certain conditions when shutting down the frozen application on linux. (#5270)(non-Windows) If the child process of a
onefilefrozen application is terminated by a signal, delay re-raising of the signal in the parent process until after the clean up has been performed. This preventsonefilefrozen applications from leaving behind their unpacked temporary directories when either the parent or the child process is sent theSIGTERMsignal. (#2379)When building with
noarchive=True(e.g.,--debug noarchiveor--debug all), PyInstaller no longer pollutes user-writable source locations with its.pycor.pyofiles written next to the corresponding source files. (#6591)When building with
noarchive=True(e.g.,--debug noarchiveor--debug all), the source paths are now stripped from the collected .pyc modules, same as if PYZ archive was used. (#6591)
Hooks¶
5.2 (2022-07-08)¶
Features¶
Detect if an icon file (
.icoor.icns) is of another image type but has been mislabelled as a native icon type via its file suffix then either normalise to a genuinely native image type ifpillowis installed or raise an error. (#6870)Exit gracefully with an explanatory
SystemExitif the user moves or deletes the application whilst it’s still running. Note that this is only detected on trying to load a module which has not already been loaded. (#6856)Implement new standard hook variable, called
warn_on_missing_hiddenimports. This optional boolean flag allows a hook to opt out from warnings generated by missing hidden imports originating from that hook. (#6914)
Bugfix¶
(Linux) Fix potential mismatch between the collected Python shared library name and the name expected by the bootloader when using Anaconda environment. The mismatch would occur on some attempts to freeze a program that uses an extension that is also linked against the python shared library. (#6831)
(Linux) Fix the missing
gi.repositoryerror in an application frozen on RHEL/Fedora linux with GObject introspection installed from the distribution’s RPM package. (#6780)(macOS) The
QtWebEnginehook now makesQtOpenGLandQtDBusavailable to the renderer process with framework installs of Qt 6. (#6892)(Windows) Optimize EXE PE headers fix-up process in an attempt to reduce the processing time and the memory footprint with large onefile builds. (#6874)
Add a try/except guard around
ctypes.util.find_library()to protect against CPython bug #93094 which leads to aFileNotFoundError. (#6864)Fix regression in PyInstaller v5 where an import of a non-existent GObject introspection (gi) module (for example, an optional dependency) in the program causes a build-time error and aborts the build process. (#6897)
If passed a name of an importable module instead of a package, the
PyInstaller.utils.hooks.collect_submodules()function now returns a list containing the module’s name, same as it would for a package without submodules. (#6850)Prevent
PyInstaller.utils.hooks.collect_submodules()from recursing into sub-packages that are excluded by the function passed via thefilterargument. (#6846)The
PyInstaller.utils.hooks.collect_submodules()function now excludes un-importable subpackages from the returned modules list. (#6850)
Hooks¶
(macOS) Disable
QtWebEnginesandboxing for Qt6 in the correspondingPySide6andPyQt6run-time hooks as a work-around for theQtWebEngineProcesshelper process crashing. This is required as of Qt 6.3.1 due to the way PyInstaller collects Qt libraries, but is applied regardless of the used Qt6 version. If you are using an older version of Qt6 and would like to keep the sandboxing, reset theQTWEBENGINE_DISABLE_SANDBOXenvironment variable at the start of your program, before importing Qt packages. (#6903)Add support for GTK4 by adding dependencies and updating
gi.repository.Gtkandgi.repository.Gdkto work withmodule-versionsin hooksconfig forgi. (#6834)Refactor the GObject introspection (
gi) hooks so that the processing is performed only in hook loading stage or in thehook()function, but not in the mixture of two. (#6901)Update the GObject introspection (
gi) hooks to use newly-introducedGiModuleInfoobject to:Check for module availability.
Perform typelib data collection; equivalent of old
get_gi_typelibsfunction call.Obtain associated shared library path, equivalent of old
get_gi_libdirfunction call.
The
get_gi_typelibsandget_gi_libdirfunctions now internally useGiModuleInfoto provide backwards-compatibility for external users. (#6901)
5.1 (2022-05-17)¶
Bugfix¶
(Windows) Fix the regression causing the (relative) spec path ending up prepended to relative icon path twice, resulting in icon not being found. (#6788)
Prevent collection of an entire Python site when using
collect_data_files()orcollect_dynamic_libs()for single-file modules (#6789)Prevent the hook utility functions, such as
collect_submodules(),collect_data_files(), andcollect_dynamic_libs(), from failing to identify a package when its PEP451-compliant loader does not implement the optionalis_packagemethod. (#6790)The
get_package_paths()function now supports PEP420 namespace packages - although for backwards-compatibility reasons, it returns only the first path when multiple paths are present. (#6790)The hook utility functions
collect_submodules(),collect_data_files(), andcollect_dynamic_libs()) now support collection from PEP420 namespace packages. (#6790)The user-provided spec file path and paths provided via
--workpathand--distpathare now resolved to absolute full paths before being passed to PyInstaller’s internals. (#6788)
5.0.1 (2022-04-25)¶
Bugfix¶
(Linux) Have
glibruntime hook prepend the frozen application’s data dir to theXDG_DATA_DIRSenvironment variable instead of completely overwriting it. This should fix the case whenxdg-openis used to launch a system-installed application (for example, opening an URL in a web browser via thewebbrowsermodule) and no registered applications being found. (#3668)Prevent unactionable errors raised by UPX from terminating the build. (#6757)
Restore the pre PyInstaller 5.0 behavior of resolving relative paths to icons as relative to the spec file rather than the current working directory. (#6759)
(Windows) Update system DLL inclusion list to allow collection of DLLs from Visual Studio 2012 (VC11) runtime and Visual Studio 2013 (VC12) runtime, as well as the latest version of Visual Studio 2015/2017/2019/2022 (VC14) runtime (14.3). (#6778)
Hooks¶
Refactor
QtWebEnginehooks to support both pure Widget-based and pure QML/Quick-based applications. (#6753)Update PySide6 and PyQt6 hooks for compatibility with Qt 6.3.
QtWebEngineon Windows and Linux does not provide theqt.conffile for the helper executable anymore, so we generate our own version of the file in order forQtWebengine-based frozen applications to work. (#6769)
5.0 (2022-04-15)¶
Features¶
(macOS) App bundles built in
onedirmode can now opt-in for argv emulation so that file paths passed from the UI (Open with…) are reflected insys.argv. (#5908)(macOS) App bundles built in
onedirmode can now opt-in for argv emulation so that file paths received in initial drag & drop event are reflected insys.argv. (#5436)(macOS) The argv emulation functionality is now available as an optional feature for app bundles built in either
onefileoronedirmode. (#6089)(Windows) Embed the manifest into generated
onedirexecutables by default, in order to avoid potential issues when user renames the executable (e.g., the manifest not being found anymore due to activation context caching when user renames the executable and attempts to run it before also renaming the manifest file). The old behavior of generating the external manifest file inonedirmode can be re-enabled using the--no-embed-manifestcommand-line switch, or via theembed_manifest=Falseargument toEXE()in the .spec file. (#6223)(Wine) Prevent collection of Wine built-in DLLs (in either PE-converted or fake/placeholder form) when building a Windows frozen application under Wine. Display a warning for each excluded Wine built-in DLL. (#6149)
Add a
PyInstaller.isolatedsubmodule as a safer replacement toPyInstaller.utils.hooks.exec_statement(). (#6052)Improve matching of UPX exclude patterns to include OS-default case sensitivity, the wildcard operator (
*), and support for parent directories in the pattern. Enables use of patterns like"Qt*.dll"and"PySide2*.pyd". (#6161)Make the error handing of
collect_submodules()configurable. (#6052)
Bugfix¶
(macOS) Fix potential loss of Apple Events during
onefileapp bundle start-up, when the child process is not yet ready to receive events forwarded by the parent process. (#6089)(Windows) Remove the attempt to load the manifest of a
onefilefrozen executable via the activation context, which fails with An attempt to set the process default activation context failed because the process default activation context was already set. message that can be observed in debug builds. This approach has been invalid ever since #3746 implemented direct manifest embedding into theonefileexecutable. (#6203)Fix an import leak when
PyInstaller.utils.hooks.get_module_file_attribute()is called with a sub-module or a sub-package name. (#6169)Fix an import leak when
PyInstaller.utils.hooks.is_package()is called with a sub-module or a sub-package name. (#6169)Fix import errors when calling
get_gi_libdir()during packaging of GTK apps. Enable CI tests of GTK by adding PyGObject dependencies for the Ubuntu builds. (#6300)Issue an error report if a .spec file will not be generated, but command-line options specific to that functionality are given. (#6660)
Prevent
onefilecleanup from recursing into symlinked directories and just remove the link instead. (#6074)
Incompatible Changes¶
(macOS) App bundles built in
onefilemode do not perform argv emulation by default anymore. The functionality of converting initial open document/URL events intosys.argventries must now be explicitly opted-in, viaargv_emulation=Trueargument toEXE()in the .spec file or via--argv-emulationcommand-line flag. (#6089)(Windows) By default, manifest is now embedded into the executable in
onedirmode. The old behavior of generating the external manifest file can be re-enabled using the--no-embed-manifestcommand-line switch, or via theembed_manifest=Falseargument toEXE()in the .spec file. (#6223)Issue an error report if a .spec file will not be generated, but command-line options specific to that functionality are given. (#6660)
The
PyInstaller.utils.hooks.get_module_attribute()function now returns the actual attribute value instead of its string representation. The external users (e.g., 3rd party hooks) of this function must adjust their handling of the return value accordingly. (#6169)The
matplotlib.backendshook no longer collects all availablematplotlibbackends, but rather tries to auto-detect the used backend(s) by default. The old behavior can be re-enabled via the hook configuration option. (#6024)
Hooks¶
Rework the
matplotlib.backendshook to attempt performing auto-detection of the used backend(s) instead of collecting all available backends. Implement hook configuration option that allows users to switch between this new behavior and the old behavior of collecting all backends, or to manually specify the backend(s) to be collected. (#6024)
Bootloader¶
Documentation¶
Add a new section describing Apple Event forwarding behavior on macOS and the optional argv emulation for macOS app bundles, along with its caveats. (#6089)
Update documentation on using
UPX. (#6161)
Bootloader build¶
(Windows) Enable Control Flow Guard for the Windows bootloader. (#6136)
4.10 (2022-03-05)¶
Features¶
(Wine) Prevent collection of Wine built-in DLLs (in either PE-converted or fake/placeholder form) when building a Windows frozen application under Wine. Display a warning for each excluded Wine built-in DLL. (#6622)
Bugfix¶
(Linux) Remove the timeout on
objcopyoperations to prevent wrongful abortions when processing large executables on slow disks. (#6647)(macOS) Limit the strict architecture validation for collected binaries to extension modules only. Fixes architecture validation errors when a
universal2package has its multi-arch extension modules’ arch slices linked against distinct single-arch thin shared libraries, as is the case withscipy1.8.0 macOSuniversal2wheel. (#6587)(macOS) Remove the 60 seconds timeout for each
codesignandlipooperation which caused build abortion when processing huge binaries. (#6644)(Windows) Use a made up (not
.exe) suffix for intermediate executable files during the build process to prevent antiviruses from attempting to scan the file whilst PyInstaller is still working on it leading to aPermissionErrorat build time. (#6467)Fix an attempt to collect a non-existent
.pycfile when the corresponding source.pyfile hasst_mtimeset to zero. (#6625)
4.9 (2022-02-03)¶
Bugfix¶
Add support for external paths when running
pkgutil.iter_modules. Add support for multiple search paths topkgutil.iter_modules. Correctly handlepkgutil.iter_moduleswith an empty list. (#6529)Fix finding
libpython3x.sowhen Python is installed with pyenv and the python executable is not linked againstlibpython3x.so. (#6542)Fix handling of symbolic links in the path matching part of the PyInstaller’s
pkgutil.iter_modulesreplacement/override. (#6537)
Hooks¶
Add hooks for
PySide6.QtMultimediaandPyQt6.QtMultimedia. (#6489)Add hooks for
QtMultimediaWidgetsof all four supported Qt bindings (PySide2,PySide6,PyQt5, andPySide6). (#6489)Add support for
setuptools 60.7.1and its vendoring ofjaraco.textinpkg_resources. Exit with an error message ifsetuptools 60.7.0is encountered due to incompatibility with PyInstaller’s loader logic. (#6564)Collect the
QtWaylandClient-related plugins to enable Wayland support in the frozen applications using any of the four supported Qt bindings (PySide2,PyQt5,PySide6, andPyQt6). (#6483)Fix the issue with missing
QtMultimediaWidgetsmodule when usingPySide2.QtMultimediaorPySide6.QtMultimediain combination with PySide’strue_propertyfeature. (#6489)
4.8 (2022-01-06)¶
Features¶
(Windows) Set the executable’s build time in PE header to the current time. A custom timestamp can be specified via the
SOURCE_DATE_EPOCHenvironment variable to allow reproducible builds. (#6469)Add strictly unofficial support for the Termux platform. (#6484)
Replace the dual-process
onedirmode on Linux and other Unix-like OSes with a single-process implementation. This makesonedirmode on these OSes comparable to Windows and macOS, where single-processonedirmode has already been used for a while. (#6407)
Bugfix¶
(macOS) Fix regression in generation of
universal2executables that caused the generated executable to failcodesignstrict validation. (#6381)(Windows) Fix
onefileextraction behavior when the run-time temporary directory is set to a drive letter. The application’s temporary directory is now created directly on the specified drive as opposed to the current directory on the specified drive. (#6051)(Windows) Fix compatibility issues with python 3.9.8 from python.org, arising from the lack of embedded manifest in the
python.exeexecutable. (#6367)(Windows) Fix stack overflow in pyarmor-protected frozen applications, caused by the executable’s stack being smaller than that of the python interpreter. (#6459)
(Windows) Fix the
python3.dllshared library not being found and collected when using Python from MS App Store. (#6390)Fix a bug that prevented traceback from uncaught exception to be retrieved and displayed in the windowed bootloader’s error reporting facility (uncaught exception dialog on Windows, syslog on macOS). (#6426)
Fix a crash when a onefile build attempts to overwrite an existing onedir build on macOS or Linux (#6418)
Fix build errors when a linux shared library (.so) file is collected as a binary on macOS. (#6327)
Fix build errors when a Windows DLL/PYD file is collected as a binary on a non-Windows OS. (#6327)
Fix handling of encodings when reading the collected .py source files via
FrozenImporter.get_source(). (#6143)Fix hook loader function not finding hooks if path has whitespaces. (Re-apply the fix that has been inadvertedly undone during the codebase reformatting.) (#6080)
Windows: Prevent invalid handle errors when an application compiled in
--windowedmode usessubprocesswithout explicitly setting stdin, stdout and stderr to eitherPIPEorDEVNULL. (#6364)
Hooks¶
(macOS) Add support for Anaconda-installed
PyQtWebEngine. (#6373)Add hooks for
PySide6.QtWebEngineWidgetsandPyQt6.QtWebEngineWidgets. TheQtWebEnginesupport in PyInstaller requiresQt6v6.2.2 or later, so if an earlier version is encountered, we exit with an error instead of producing a defunct build. (#6387)Avoid collecting the whole
QtQmlmodule and its dependencies in cases when it is not necessary (i.e., the application does not useQtQmlorQtQuickmodules). The unnecessary collection was triggered due to extension modules being linked against thelibQt5QmlorlibQt6Qmlshared library, and affected pure widget-based applications (PySide2andPySide6on Linux) and widget-based applications that useQtWebEngineWidgets(PySide2,PySide6,PyQt5, andPyQt6on all OSes). (#6447)Update
numpyhook for compatibility with version 1.22; the hook cannot excludedistutilsandnumpy.distutilsanymore, as they are required bynumpy.testing, which is used by some external packages, such asscipy. (#6474)
Bootloader¶
(Windows) Set the bootloader executable’s stack size to 2 MB to match the stack size of the python interpreter executable. (#6459)
Implement single-process
onedirmode for Linux and Unix-like OSes as a replacement for previously-used two-process implementation. The new mode usesexec()withoutfork()to restart the bootloader executable image within the same process after setting up the environment (i.e., theLD_LIBRARY_PATHand other environment variables). (#6407)Lock the PKG sideload mode in the bootloader unless the executable has a special signature embedded. (#6470)
When user script terminates with an uncaught exception, ensure that the exception data obtained via
PyErr_Fetchis normalized by also callingPyErr_NormalizeException. Otherwise, trying to format the traceback viatraceback.format_exceptionfails in some circumstances, and no traceback can be displayed in the windowed bootloader’s error report. (#6426)
4.7 (2021-11-10)¶
Bugfix¶
Fix a bug since v4.6 where certain Unix system directories were incorrectly assumed to exist and resulted in a
FileNotFoundError. (#6331)
Bootloader¶
(Windows) Explicitly set
NTDDI_VERSION=0x06010000and_WIN32_WINNT=0x0601when compiling Windows bootloaders to request Windows 7 feature level for Windows headers. The windowed bootloader requires at least Windows Vista feature level, and some toolchains (e.g., mingw cross-compiler on linux) set too low level by default. (#6338)(Windows) Remove the check for the unused
windresutility when compiling with MinGW toolchain. (#6339)Replace use of
PyRun_SimpleStringwithPyRun_SimpleStringFlags. (#6332)
4.6 (2021-10-29)¶
Features¶
Add support for Python 3.10. (#5693)
(Windows) Embed the manifest into generated
onedirexecutables by default, in order to avoid potential issues when user renames the executable (e.g., the manifest not being found anymore due to activation context caching when user renames the executable and attempts to run it before also renaming the manifest file). The old behavior of generating the external manifest file inonedirmode can be re-enabled using the--no-embed-manifestcommand-line switch, or via theembed_manifest=Falseargument toEXE()in the .spec file. (#6248)(Windows) Respect PEP 239 encoding specifiers in Window’s VSVersionInfo files. (#6259)
Implement basic resource reader for accessing on-filesystem resources (data files) via
importlib.resources(python >= 3.9) orimportlib_resources(python <= 3.8). (#5616)Ship precompiled wheels for musl-based Linux distributions (such as Alpine or OpenWRT) on
x86_64andaarch64. (#6245)
Bugfix¶
(macOS) Ensure that executable pre-processing and post-processing steps (target arch selection, SDK version adjustment, (re)signing) are applied in the stand-alone PKG mode. (#6251)
(macOS) Robustify the macOS assembly pipeline to work around the issues with the
codesignutility on macOS 10.13 High Sierra. (#6167)(Windows) Fix collection of
sysconfigplatform-specific data module when using MSYS2/MINGW python. (#6118)(Windows) Fix displayed script name and exception message in the unhandled exception dialog (windowed mode) when bootloader is compiled using the
MinGW-w64toolchain. (#6199)(Windows) Fix issues in
onedirfrozen applications when the bootloader is compiled using a toolchain that forcibly embeds a default manifest (e.g., theMinGW-w64toolchain frommsys2). The issues range from manifest-related options (e.g.,uac-admin) not working to windowed frozen application not starting at all (with theThe procedure entry point LoadIconMetric could not be located...error message). (#6196)(Windows) Fix the declared length of strings in the optional embedded product version information resource structure. The declared lengths were twice too long, and resulted in trailing garbage characters when the version information was read using ctypes and winver API. (#6219)
(Windows) Remove the attempt to load the manifest of a
onefilefrozen executable via the activation context, which fails withAn attempt to set the process default activation context failed because the process default activation context was already set.message that can be observed in debug builds. This approach has been invalid ever since #3746 implemented direct manifest embedding into theonefileexecutable. (#6248)(Windows) Suppress missing library warnings for
api-ms-win-core-*DLLs. (#6201)(Windows) Tolerate reading Windows VSVersionInfo files with unicode byte order marks. (#6259)
Fix
sys.executablepointing to the external package file instead of the executable when in package side-load mode (pkg_append=False). (#6202)Fix a runaway glob which caused
ctypes.util.find_library("libfoo")to non-deterministically pick any library matchinglibfoo*to bundle instead oflibfoo.so. (#6245)Fix compatibility with with MIPS and loongarch64 architectures. (#6306)
Fix the
FrozenImporter.get_source()to correctly handle the packages’__init__.pysource files. This in turn fixes missing-source-file errors for packages that usepytorchJIT when the source .py files are collected and available (for example,kornia). (#6237)Fix the location of the generated stand-alone pkg file when using the side-load mode (
pkg_append=False) in combination withonefilemode. The package file is now placed next to the executable instead of next to the .spec file. (#6202)When generating spec files, avoid hard-coding the spec file’s location as the
pathexargument to theAnalysis. (#6254)
Incompatible Changes¶
(Windows) By default, manifest is now embedded into the executable in
onedirmode. The old behavior of generating the external manifest file can be re-enabled using the--no-embed-manifestcommand-line switch, or via theembed_manifest=Falseargument toEXE()in the .spec file. (#6248)
Hooks¶
(macOS) Fix compatibility with Anaconda
PyQt5package. (#6181)Add a hook for
pandas.plottingto restore compatibility withpandas1.3.0 and later. (#5994)Add a hook for
QtOpenGLWidgetsforPyQt6andPySide6to collect the newQtOpenGLWidgetsmodule introduced in Qt6 (#6310)Add hooks for
QtPositioningandQtLocationmodules of the Qt5-based packages (PySide2andPyQt5) to ensure that corresponding plugins are collected. (#6250)Fix compatibility with
PyQt55.9.2 from conda’s main channel. (#6114)Prevent potential error in hooks for Qt-based packages that could be triggered by a partial
PyQt6installation. (#6141)Update
QtNetworkhook forPyQt6andPySide6to collect the newtlsplugins that were introduced in Qt 6.2. (#6276)Update the
gi.repository.GtkSourcehook to accept a module-versions hooksconfig dict in order to allow the hook to be used with GtkSource versions greater than 3.0. (#6267)
Bootloader¶
(Windows) Suppress two
snprintftruncation warnings that prevented bootloader from building withwinlibs MinGW-w64toolchain. (#6196)Update the Linux bootloader cross compiler Dockerfile to allow using the official PyPA base images in place of the dockcross ones. (#6245)
4.5.1 (2021-08-06)¶
4.5 (2021-08-01)¶
Features¶
(POSIX) Add
exclude_system_librariesfunction to the Analysis class for .spec files, to exclude most or all non-Python system libraries from the bundle. Documented in new POSIX Specific Options section. (#6022)
Bugfix¶
(Cygwin) Add
_MEIPASSto DLL search path to fix loading of python shared library in onefile builds made in cygwin environment and executed outside of it. (#6000)(Linux) Display missing library warnings for “not found” lines in
lddoutput (i.e.,libsomething.so => not found) instead of quietly ignoring them. (#6015)(Linux) Fix spurious missing library warning when
libc.sopoints toldd. (#6015)(macOS) Fix python shared library detection for non-framework python builds when the library path cannot be inferred from imports of the
pythonexecutable. (#6021)(macOS) Fix the crashes in
onedirbundles oftkinter-based applications created using Homebrew python 3.9 and Tcl/Tk 8.6.11. (#6043)(macOS) When fixing executable for codesigning, update the value of
vmsizefield in the__LINKEDITsegment. (#6039)Downgrade messages about missing dynamic link libraries from ERROR to WARNING. (#6015)
Fix a bytecode parsing bug which caused tuple index errors whilst scanning modules which use
ctypes. (#6007)Fix an error when rhtooks for
pkgutilandpkg_resourcesare used together. (#6018)Fix architecture detection on Apple M1 (#6029)
Fix crash in windowed bootloader when the traceback for unhandled exception cannot be retrieved. (#6070)
Improve handling of errors when loading hook entry-points. (#6028)
Suppress missing library warning for
shiboken2(PySide2) andshiboken6(PySide6) shared library. (#6015)
Incompatible Changes¶
(macOS) Disable processing of Apple events for the purpose of argv emulation in
onedirapplication bundles. This functionality was introduced in PyInstaller 4.4 by (#5920) in response to feature requests (#5436) and (#5908), but was discovered to be breakingtkinter-basedonedirbundles made with Homebrew python 3.9 and Tcl/Tk 8.6.11 (#6043). As such, until the cause is investigated and the issue addressed, this feature is reverted/disabled. (#6048)
Hooks¶
Documentation¶
Add a page describing hook configuration mechanism and the currently implemented options. (#6025)
4.4 (2021-07-13)¶
Features¶
(macOS) Implement signing of .app bundle (ad-hoc or with actual signing identity, if provided). (#5581)
(macOS) Implement support for Apple Silicon M1 (
arm64) platform and different targets for frozen applications (thin-binaryx86_64, thin-binaryarm64, and fat-binaryuniversal2), with build-time arch validation and ad-hoc resigning of all collected binaries. (#5581)(macOS) In
onedirwindowed(.app bundle) mode, perform an interaction of Apple event processing to convertodocandGURLevents tosys.argvbefore entering frozen python script. (#5920)(macOS) In windowed (.app bundle) mode, always log unhandled exception information to
syslog, regardless of debug mode. (#5890)(Windows) Add support for Python from Microsoft App Store. (#5816)
(Windows) Implement a custom dialog for displaying information about unhandled exception and its traceback when running in windowed/noconsole mode. (#5890)
Add recursive option to
PyInstaller.utils.hooks.copy_metadata(). (#5830)Add
--codesign-identitycommand-line switch to perform code-signing with actual signing identity instead of ad-hoc signing (macOS only). (#5581)Add
--osx-entitlements-filecommand-line switch that specifies optional entitlements file to be used during code signing of collected binaries (macOS only). (#5581)Add
--target-archcommand-line switch to select target architecture for frozen application (macOS only). (#5581)Add a splash screen that displays a background image and text: The splash screen can be controlled from within Python using the
pyi_splashmodule. A splash screen can be added using the--splash IMAGE_FILEoption. If optional text is enabled, the splash screen will show the progress of unpacking in onefile mode. This feature is supported only on Windows and Linux. A huge thanks to @Chrisg2000 for programming this feature. (#4354, #4887)Add hooks for
PyQt6. (#5865)Add hooks for
PySide6. (#5865)Add option to opt-out from reporting full traceback for unhandled exceptions in windowed mode (Windows and macOS only), via
--disable-windowed-tracebackPyInstaller CLI switch and the correspondingdisable_windowed_tracebackboolean argument toEXE()in spec file. (#5890)Allow specify which icon set, themes and locales to pack with Gtk applications. Pass a keyword arg
hooksconfigto Analysis.a = Analysis(["my-gtk-app.py"], ..., hooksconfig={ "gi": { "icons": ["Adwaita"], "themes": ["Adwaita"], "languages": ["en_GB", "zh_CN"] } }, ...)
(#5853)
Automatically exclude Qt plugins from UPX processing. (#4178)
Collect distribution metadata automatically. This works by scanning collected Python files for uses of:
pkg_resources.get_distribution()pkg_resources.require()importlib.metadata.distribution()importlib.metadata.metadata()importlib.metadata.files()importlib.metadata.version()
In all cases, the metadata will only be collected if the distribution name is given as a plain string literal. Anything more complex will still require a hook containing
PyInstaller.utils.hooks.copy_metadata(). (#5830)Implement support for
pkgutil.iter_modules(). (#1905)Windows: Provide a meaningful error message if given an icon in an unsupported Image format. (#5755)
Bugfix¶
(macOS) App bundles built in
onedirmode now filter out-psnxxxcommand-line argument fromsys.argv, to keep behavior consistent with bundles built inonefilemode. (#5920)(macOS) Ensure that the macOS SDK version reported by the frozen application corresponds to the minimum of the SDK version used to build the bootloader and the SDK version used to build the Python library. Having the application report more recent version than Python library and other bundled libraries may result in macOS attempting to enable additional features that are not available in the Python library, which may in turn cause inconsistent behavior and UI issues with
tkinter. (#5839)(macOS) Remove spurious
MacOS/prefix fromCFBundleExecutableproperty in the generatedInfo.plistwhen building an app bundle. (#4413, #5442)(macOS) The drag & drop file paths passed to app bundles built in
onedirmode are now reflected insys.argv. (#5436)(macOS) The file paths passed from the UI (Open with…) to app bundles built in
onedirmode are now reflected insys.argv. (#5908)(macOS) Work around the
tkinterUI issues due to problems with dark mode activation: blackTkwindow with macOS Intel installers frompython.org, or white text on bright background with Anaconda python. (#5827)(Windows) Enable collection of additional VC runtime DLLs (
msvcp140.dll,msvcp140_1.dll,msvcp140_2.dll, andvcruntime140_1.dll), to allow frozen applications to run on Windows systems that do not have Visual Studio 2015/2017/2019 Redistributable installed. (#5770)Enable retrieval of code object for
__main__module via its associated loader (i.e.,FrozenImporter). (#5897)Fix
inspect.getmodule()failing to resolve module from stack-frame obtained viainspect.stack(). (#5963)Fix
__main__module being recognized as built-in instead of module. (#5897)Fix a bug in ctypes dependency scanning which caused references to be missed if the preceding code contains more than 256 names or 256 literals. (#5830)
Fix collection of duplicated
_structandzlibextension modules with mangled filenames. (#5851)Fix python library lookup when building with RH SCL python 3.8 or later. (#5749)
Prevent
PyInstaller.utils.hooks.copy_metadata()from renaming[...].dist-infometadata folders to[...].egg-infowhich breaks usage ofpkg_resources.requires()with extras. (#5774)Prevent a bootloader executable without an embedded CArchive from being misidentified as having one, which leads to undefined behavior in frozen applications with side-loaded CArchive packages. (#5762)
Prevent the use of
sysorosas variables in the global namespace in frozen script from affecting thectypeshooks thar are installed during bootstrap. (#5797)Windows: Fix EXE being rebuilt when there are no changes. (#5921)
Hooks¶
Add
PostGraphAPI.analysisattribute. Hooks can access theAnalysisobject through thehook()function.Hooks may access a
Analysis.hooksconfigattribute assigned onAnalysisconstruction.A helper function
get_hook_config()was defined inutils.hooksto get the config. (#5853)
Add support for
PyQt55.15.4. (#5631)Do not exclude
setuptools.py27compatandsetuptools.py33compatas they are required by othersetuptoolsmodules. (#5979)Switch the library search order in
ctypeshooks: first check whether the given name exists as-is, before trying to search for its basename insys._MEIPASS(instead of the other way around). (#5907)
Bootloader¶
(macOS) Build bootloader as
universal2binary by default (can be disabled by passing--no-universal2to waf). (#5581)Add Tcl/Tk based Splash screen, which is controlled from within Python. The necessary module to create the Splash screen in PyInstaller is under
Splashavailable. A huge thanks to @Chrisg2000 for programming this feature. (#4887)Provide a Dockerfile to build Linux bootloaders for different architectures. (#5995)
4.3 (2021-04-16)¶
Features¶
Provide basic implementation for
FrozenImporter.get_source()that allows reading source from.pyfiles that are collected by hooks as data files. (#5697)Raise the maximum allowed size of
CArchive(and consequentlyonefileexecutables) from 2 GiB to 4 GiB. (#3939)The unbuffered stdio mode (the
uoption) now sets thePy_UnbufferedStdioFlagflag to enable unbuffered stdio mode in Python library. (#1441)Windows: Set EXE checksums. Reduces false-positive detection from antiviral software. (#5579)
Add new command-line options that map to collect functions from hookutils:
--collect-submodules,--collect-data,--collect-binaries,--collect-all, and--copy-metadata. (#5391)Add new hook utility
collect_entry_point()for collecting plugins defined through setuptools entry points. (#5734)
Bugfix¶
(macOS) Fix
Bad CPU type in executableerror in helper-spawned python processes when running underarm64-only flavor of Python on Apple M1. (#5640)(OSX) Suppress missing library error messages for system libraries as those are never collected by PyInstaller and starting with Big Sur, they are hidden by the OS. (#5107)
(Windows) Change default cache directory to
LOCALAPPDATA(from the originalAPPDATA). This is to make sure that cached data doesn’t get synced with the roaming profile. For this and future versionsAppData\Roaming\pyinstallermight be safely deleted. (#5537)(Windows) Fix
onefilebuilds not having manifest embedded when icon is disabled via--icon NONE. (#5625)(Windows) Fix the frozen program crashing immediately with
Failed to execute script pyiboot01_bootstrapmessage when built innoconsolemode and with import logging enabled (either via--debug importsor--debug allcommand-line switch). (#4213)CArchiveReadernow performs full back-to-front file search forMAGIC, allowingpyi-archive_viewerto open binaries with extra appended data after embedded package (e.g., digital signature). (#2372)Fix
MERGE()to properly set references to nested resources with their full shared-package-relative path instead of just basename. (#5606)Fix
onefilebuilds failing to extract files when the full target path exceeds 260 characters. (#5617)Fix a crash in
pyi-archive_viewerwhen quitting the application or moving up a level. (#5554)Fix extraction of nested files in
onefilebuilds created in MSYS environments. (#5569)Fix installation issues stemming from unicode characters in file paths. (#5678)
Fix the build-time error under python 3.7 and earlier when
ctypesis manually added tohiddenimports. (#3825)Fix the return code if the frozen script fails due to unhandled exception. The return code 1 is used instead of -1, to keep the behavior consistent with that of the python interpreter. (#5480)
Linux: Fix binary dependency scanner to support changes to ldconfig introduced in
glibc2.33. (#5540)Prevent
MERGE(multipackage) from creating self-references for duplicated TOC entries. (#5652)PyInstaller-frozen onefile programs are now compatible with
staticxeven if the bootloader is built as position-independent executable (PIE). (#5330)Remove dependence on a private function removed in
matplotlib3.4.0rc1. (#5568)Strip absolute paths from
.pycmodules collected intobase_library.zipto enable reproducible builds that are invariant to Python install location. (#5563)(OSX) Fix issues with
pycryptodomexon macOS. (#5583)Allow compiled modules to be collected into
base_library.zip. (#5730)Fix a build error triggered by scanning
ctypes.CDLL('libc.so')on certain Linux C compiler combinations. (#5734)Improve performance and reduce stack usage of module scanning. (#5698)
Hooks¶
Add support for Conda Forge’s distribution of
NumPy. (#5168)Add support for package content listing via
pkg_resources. The implementation enables querying/listing resources in a frozen package (both PYZ-embedded and on-filesystem, in that order of precedence) viapkg_resources.resource_exists(),resource_isdir(), andresource_listdir(). (#5284)Hooks: Import correct typelib for GtkosxApplication. (#5475)
Prevent
matplotlibhook from collecting current working directory when it fails to determine the path to matplotlib’s data directory. (#5629)Update
pandashook for compatibility with version 1.2.0 and later. (#5630)Update hook for
distutils.sysconfigto be compatible with pyenv-virtualenv. (#5218)Update hook for
sqlalchemyto support version 1.4.0 and above. (#5679)Update hook for
sysconfigto be compatible with pyenv-virtualenv. (#5018)
Bootloader¶
Implement full back-to-front file search for the embedded archive. (#5511)
Perform file extraction from the embedded archive in a streaming manner in order to limit memory footprint when archive contains large files. (#5551)
Set the
__file__attribute in the__main__module (entry-point script) to the absolute file name inside the_MEIPASS. (#5649)Enable cross compiling for FreeBSD from Linux. (#5733)
Documentation¶
PyInstaller Core¶
Drop support for python 3.5; EOL since September 2020. (#5439)
Collect python extension modules that correspond to built-ins into
lib-dynloadsub-directory instead of directly into bundle’s root directory. This prevents them from shadowing shared libraries with the same basename that are located in a package and loaded viactypesorcffi, and also declutters the bundle’s root directory. (#5604)
Breaking¶
No longer collect
pyconfig.handmakefileforsysconfig. Instead ofget_config_h_filename()andget_makefile_filename(), you should useget_config_vars()which no longer depends on those files. (#5218)The
__file__attribute in the__main__module (entry-point script) is now set to the absolute file name inside the_MEIPASS(as if script file existed there) instead of just script filename. This better matches the behavior of__file__in the unfrozen script, but might break the existing code that explicitly relies on the old frozen behavior. (#5649)
4.2 (2021-01-13)¶
Features¶
Add hooks utilities to find binary dependencies of Anaconda distributions. (#5213)
(OSX) Automatically remove the signature from the collected copy of the
Pythonshared library, usingcodesign --remove-signature. This accommodates bothonedirandonefilebuilds with recent python versions for macOS, where invalidated signature on PyInstaller-collected copy of thePythonlibrary prevents the latter from being loaded. (#5451)(Windows) PyInstaller’s console or windowed icon is now added at freeze-time and no longer built into the bootloader. Also, using
--icon=NONEallows to not apply any icon, thereby making the OS to show some default icon. (#4700)(Windows) Enable
longPathAwareoption in built application’s manifest in order to support long file paths on Windows 10 v.1607 and later. (#5424)
Bugfix¶
Fix loading of plugin-type modules at run-time of the frozen application: If the plugin path is one character longer than sys._MEIPATH (e.g. “$PWD/p/plugin_1” and “$PWD/dist/main”), the plugin relative-imports a sub-module (of the plugin) and the frozen application contains a module of the same name, the frozen application module was imported. (#4141, #4299)
Ensure that spec for frozen packages has
submodule_search_locationsset in order to fix compatibility withimportlib_resources3.2.0 and later. (#5396)Fix: No rebuild if “noarchive” build-option changes. (#5404)
(OSX) Fix the problem with
Pythonshared library collected from recent python versions not being loaded due to invalidated signature. (#5062, #5272, #5434)(Windows) PyInstaller’s default icon is no longer built into the bootloader, but added at freeze-time. Thus, when specifying an icon, only that icon is contained in the executable and displayed for a shortcut. (#870, #2995)
(Windows) Fix “toc is bad” error messages when passing a
VSVersionInfoas theversionparameter toEXE()in a.specfile. (#5445)(Windows) Fix exception when trying to read a manifest from an exe or dll. (#5403)
(Windows) Fix the
--runtime-tmpdiroption by creating paths if they don’t exist and expanding environment variables (e.g.%LOCALAPPDATA%). (#3301, #4579, #4720)
Hooks¶
(GNU/Linux) Collect
xcbglintegrationsandegldeviceintegrationsplugins as part ofQt5Gui. (#5349)(macOS) Fix: Unable to code sign apps built with GTK (#5435)
(Windows) Add a hook for
win32ctypes.core. (#5250)Add hook for
scipy.spatial.transform.rotationto fix compatibility with SciPy 1.6.0. (#5456)Add hook-gi.repository.GtkosxApplication to fix TypeError with Gtk macOS apps. (#5385)
Add hooks utilities to find binary dependencies of Anaconda distributions. (#5213)
Fix the
Qt5library availability check inPyQt5andPySide2hooks to re-enable support forQt5older than 5.8. (#5425)Implement
exec_statement_rc()andexec_script_rc()as exit-code returning counterparts ofexec_statement()andexec_script(). Implementcan_import_module()helper for hooks that need to query module availability. (#5301)Limit the impact of a failed sub-package import on the result of
collect_submodules()to ensure that modules from all other sub-packages are collected. (#5426)Removed obsolete
pygamehook. (#5362)Update
keyringhook to collect metadata, which is required for backend discovery. (#5245)
Bootloader¶
(GNU/Linux) Reintroduce executable resolution via
readlink()on/proc/self/exeand preserve the process name usingprctl()withPR_GET_NAMEandPR_SET_NAME. (#5232)(Windows) Create temporary directories with user’s SID instead of
S-1-3-4, to work around the lack of support for the latter inwine. This enablesonefilebuilds to run underwineagain. (#5216)(Windows) Fix a bug in path-handling code with paths exceeding
PATH_MAX, which is caused by use of_snprintfinstead ofsnprintfwhen building with MSC. Requires Visual Studio 2015 or later. Clean up the MSC codepath to address other compiler warnings. (#5320)(Windows) Fix building of bootloader’s test suite under Windows with Visual Studio. This fixes build errors when
cmockais present in the build environment. (#5318)(Windows) Fix compiler warnings produced by MinGW 10.2 in order to allow building the bootloader without having to suppress the warnings. (#5322)
(Windows) Fix
windowed+debugbootloader variant not properly displaying the exception message and traceback information when the frozen script terminates due to uncaught exception. (#5446)
PyInstaller Core¶
(Windows) Avoid using UPX with DLLs that have control flow guard (CFG) enabled. (#5382)
Avoid using
.pyomodule file suffix (removed since PEP-488) innoarchivemode. (#5383)Improve support for
PEP-420namespace packages. (#5354)Strip absolute paths from
.pycmodules collected in the CArchive (PKG). This enables build reproducibility without having to match the location of the build environment. (#5380)
4.1 (2020-11-18)¶
Bugfix¶
Hooks¶
Add
exclude_datas,include_datas, andfilter_submodulestocollect_all(). These arguments map to theexcludesandincludesarguments ofcollect_data_files, and to the filter argument ofcollect_submodules. (#5113)Add hook for difflib to not pull in doctests, which is only required when run as main program.
Add hook for distutils.util to not pull in lib2to3 unittests, which will be rearly used in frozen packages.
Add hook for heapq to not pull in doctests, which is only required when run as main program.
Add hook for multiprocessing.util to not pull in python test-suite and thus e.g. tkinter.
Add hook for numpy._pytesttester to not pull in pytest.
Add hook for pickle to not pull in doctests and argpargs, which are only required when run as main program.
Add hook for PIL.ImageFilter to not pull numpy, which is an optional component.
Add hook for setuptools to not pull in numpy, which is only imported if installed, not mean to be a dependency
Add hook for zope.interface to not pull in pytest unittests, which will be rearly used in frozen packages.
Add hook-gi.repository.HarfBuzz to fix Typelib error with Gtk apps. (#5133)
Enable overriding Django settings path by DJANGO_SETTINGS_MODULE environment variable. (#5267)
Fix collect_system_data_files to scan the given input path instead of its parent. File paths returned by collect_all_system_data are now relative to the input path. (#5110)
Fix argument order in
exec_script()andeval_script(). (#5300)Gevent hook does not unnecessarily bundle HTML documentation, __pycache__ folders, tests nor generated .c and .h files (#4857)
gevent: Do not pull in test-suite (still to be refined)
Modify hook for
geventto exclude test submodules. (#5201)Prevent .pyo files from being collected by collect_data_files when include_py_files is False. (#5141)
Prevent output to
stdoutduring module imports from ending up in the modules list collected bycollect_submodules. (#5244)Remove runtime hook and fix regular hook for matplotlib’s data to support
matplotlib>=3.3.0, fix deprecation warning on version 3.1<= & <3.3, and behave normally for versions <3.1. (#5006)Remove support for deprecated PyQt4 and PySide (#5118, #5126)
setuptools: Exclude outdated compat modules.
Update
sqlalchemyhook to support v1.3.19 and later, by addingsqlalchemy.ext.bakedas a hidden import (#5128)Update
tkinterhook to collect Tcl modules directory (tcl8) in addition to Tcl/Tk data directories. (#5175)(GNU/Linux) {PyQt5,PySide2}.QtWebEngineWidgets: fix search for extra NSS libraries to prevent an error on systems where /lib64/nss/*.so comes up empty. (#5149)
(OSX) Avoid collecting data from system Tcl/Tk framework in
tkinterhook as we do not collect their shared libraries, either. Affects only python versions that still use the system Tcl/Tk 8.5. (#5217)(OSX) Correctly locate the tcl/tk framework bundled with official python.org python builds from v.3.6.5 on. (#5013)
(OSX) Fix the QTWEBENGINEPROCESS_PATH set in PyQt5.QtWebEngineWidgets rthook. (#5183)
(OSX) PySide2.QtWebEngineWidgets: add QtQmlModels to included libraries. (#5150)
(Windows) Remove the obsolete python2.4-era
_handle_broken_tcl_tkwork-around for old virtual environments from thetkinterhook. (#5222)
Bootloader¶
Fix freeing memory allocated by Python using
free()instead ofPyMem_RawFree(). (#4441)(GNU/Linux) Avoid segfault when temp path is missing. (#5255)
(GNU/Linux) Replace a
strncpy()call inpyi_path_dirname()withsnprintf()to ensure that the resulting string is always null-terminated. (#5212)(OSX) Added capability for already-running apps to accept URL & drag’n drop events via Apple Event forwarding (#5276)
(OSX) Bump
MACOSX_DEPLOYMENT_TARGETfrom 10.7 to 10.13. (#4627, #4886)(OSX) Fix to reactivate running app on “reopen” (#5295)
(Windows) Use
_wfullpath()instead of_fullpath()inpyi_path_fullpathto allow non-ASCII characters in the path. (#5189)
Documentation¶
Add zlib to build the requirements in the Building the Bootlooder section of the docs. (#5130)
PyInstaller Core¶
Add informative message what do to if RecurrsionError occurs. (#4406, #5156)
Prevent a local directory with clashing name from shadowing a system library. (#5182)
Use module loaders to get module content instea of an quirky way semming from early Python 2.x times. (#5157)
(OSX) Exempt the
Tcl/Tkdynamic libraries in the system framework from relative path overwrite. Fix missingTcl/Tkdynlib on older python.org builds that still make use of the system framework. (#5172)
Test-suite and Continuous Integration¶
Bootloader build¶
Fix AppImage builds that were broken since PyInstaller 3.6. (#4693)
Update build system to use Python 3.
OSX: Fixed the ineffectiveness of the
--distpathargument for theBUNDLEstep. (#4892)OSX: Improve codesigning and notarization robustness. (#3550, #5112)
OSX: Use high resolution mode by default for GUI applications. (#4337)
4.0 (2020-08-08)¶
Features¶
Provide setuptools entrypoints to enable other packages to provide PyInstaller hooks specific to that package, along with tests for these hooks.
Maintainers of Python packages requiring hooks are invited to use this new feature and provide up-to-date PyInstaller support along with their package. This is quite easy, see our sample project for more information (#4232, #4301, #4582). Many thanks to Bryan A. Jones for implementing the important parts.
A new package pyinstaller-hooks-contrib provides monthly updated hooks now. This package is installed automatically when installing PyInstaller, but can be updated independently. Many thanks to Legorooj for setting up the new package and moving the hooks there.
Added the
excludesandincludesarguments to the hook utility functioncollect_data_files.Change the hook collection order so that the hook-priority is command line, then entry-point, then PyInstaller builtins. (#4876)
Bugfix¶
(AIX) Include python-malloc labeled libraries in search for libpython. (#4738)
(win32) Fix Security Alerts caused by subtle implementation differences between posix anf windows in
os.path.dirname(). (#4707)(win32) Fix struct format strings for versioninfo. (#4861)
(Windows) cv2: bundle the opencv_videoio_ffmpeg*.dll, if available. (#4999)
(Windows) GLib: bundle the spawn helper executables for g_spawn* API. (#5000)
(Windows) PySide2.QtNetwork: search for SSL DLLs in PrefixPath in addition to BinariesPath. (#4998)
(Windows) When building with 32-bit python in onefile mode, set the
requestedExecutionLevelmanifest key every time and embed the manifest. (#4992)Allow building on a different drive than the source. (#4820)
Consider Python<version> as possible library binary path. Fixes issue where python is not found if Python3 is installed via brew on OSX (#4895)
Ensure shared dependencies from onefile packages can be opened in the bootloader.
Ensuring repeatable builds of base_library.zip. (#4654)
Fix
FileNotFoundErrorshowing up inutils/misc.pywhich occurs when a namespace was processed as an filename. (#4034)Fix multipackaging. The MERGE class will now have the correct relative paths between shared dependencies which can correctly be opened by the bootloader. (#1527, #4303)
Fix regression when trying to avoid hard-coded paths in .spec files.
Fix SIGTSTP signal handling to allow typing Ctrl-Z from terminal. (#4244)
Update the base library to support encrypting Python bytecode (
--keyoption) again. Many thanks to Matteo Bertini for finally fixing this. (#2365, #3093, #3133, #3160, #3198, #3316, #3619, #4241, #4652)When stripping the leading parts of paths in compiled code objects, the longest possible import path will now be stripped. (#4922)
Incompatible Changes¶
Remove support for Python 2.7. The minimum required version is now Python 3.5. The last version supporting Python 2.7 was PyInstaller 3.6. (#4623)
Many hooks are now part of the new pyinstaller-hooks-contrib repository. See below for a detailed list.
Hooks¶
Add hook for
scipy.stats._stats(needed for scipy since 1.5.0). (#4981)Prevent hook-nltk from adding non-existing directories. (#3900)
Fix
importlib_resourceshook for modern versions (after 1.1.0). (#4889)Fix hidden imports in pkg_resources and packaging (#5044)
Add yet more hidden imports to pkg_resources hook.
Mirror the pkg_resources hook for packaging which may or may not be duplicate of
pkg_resources._vendor.packaging.
Update pkg_resources hook for setuptools v45.0.0.
Add QtQmlModels to included libraries for QtWebEngine on OS X (#4631).
Fix detecting Qt5 libraries and dependencies from conda-forge builds (#4636).
Add an AssertionError message so that users who get an error due to Hook conflicts can resolve it (#4626).
These hooks have been moved to the new pyinstaller-hooks-contrib repository: BTrees, Crypto, Cryptodome, IPython, OpenGL, OpenGL_accelerate, Xlib, accessible_output2, adios, aliyunsdkcore, amazonproduct, appdirs, appy, astor, astroid, astropy, avro, bacon, boto, boto3, botocore, certifi, clr, countrycode, cryptography, cv2, cx_Oracle, cytoolz, dateparser, dclab, distorm3, dns, docutils, docx, dynaconf, enchant, enzyme, eth_abi, eth_account, eth_hash, eth_keyfile, eth_utils, faker, flex, fmpy, gadfly, gooey, google.*, gst, gtk, h5py, httplib, httplib2, imageio, imageio_ffmpeg, jedi, jinja2, jira, jsonpath_rw_ext, jsonschema, jupyterlab, kinterbasdb, langcodes, lensfunpy, libaudioverse, llvmlite, logilab, lxml, lz4, magic, mako, markdown, migrate, mpl_toolkits, mssql, mysql, nacl, names, nanite, nbconvert, nbdime, nbformat, ncclient, netCDF4, nltk, nnpy, notebook, numba, openpyxl, osgeo, passlib, paste, patsy, pendulum, phonenumbers, pint, pinyin, psychopy, psycopg2, pubsub, pyarrow, pycountry, pycparser, pyexcel, pyexcelerate, pylint, pymssql, pyodbc, pyopencl, pyproj, pysnmp, pytest, pythoncom, pyttsx, pywintypes, pywt, radicale, raven, rawpy, rdflib, redmine, regex, reportlab, reportlab, resampy, selenium, shapely, skimage, sklearn, sound_lib, sounddevice, soundfile, speech_recognition, storm, tables, tcod, tensorflow, tensorflow_corethon, text_unidecode, textdistance, torch, ttkthemes, ttkwidgets, u1db, umap, unidecode, uniseg, usb, uvloop, vtkpython, wavefile, weasyprint, web3, webrtcvad, webview, win32com, wx, xml.dom, xml.sax, xsge_gui, zeep, zmq.
These hooks have been added while now moved to the new pyinstaller-hooks-contrib repository: astor (#4400, #4704), argon2 (#4625) bcrypt. (#4735), (Bluetooth Low Energy platform Agnostic Klient for Python) (#4649) jaraco.text (#4576, #4632), LightGBM. (#4634), xmldiff (#4680), puremagic (identify a file based off it’s magic numbers) (#4709) webassets (#4760), tensorflow_core (to support tensorflow module forwarding logic (#4400, #4704)
These changes have been applied to hooks now moved to the new pyinstaller-hooks-contrib repository
Bootloader¶
Rework bootloader from using strcpy/strncpy with “is this string terminated”-check to use snprintf(); check success at more places. (This started from fixing GCC warnings for strncpy and strncat.)
Fix: When copying files, too much data was copied in most cases. This corrupted the file and inhibited using shared dependencies. (#4303)
In debug and windowed mode, show the traceback in dialogs to help debug pyiboot01_bootstrap errors. (#4213, #4592)
Started a small test-suite for bootloader basic functions. (#4585)
PyInstaller Core¶
Provide setuptools entrypoints to enable other packages to provide PyInstaller hooks specific to that package, along with tests for these hooks. See https://github.com/pyinstaller/hooksample for more information. (#4232, #4582)
Bootloader build¶
(AIX) The argument -X32 or -X64 is not recognized by the AIX loader - so this code needs to be removed. (#4730, #4731)
(OSX) Allow end users to override MACOSX_DEPLOYMENT_TARGET and mmacosx-version-min via environment variables and set 10.7 as the fallback value for both. (#4677)
Do not print info about
--noconfirmwhen option is already being used. (#4727)Update waf to version 2.0.20 (#4839)