-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hookutils: adjust behavior of collect_data_files with include_py_files
Adjust the behavior of `collect_data_files` when the `include_py_files` flag is enabled: collect only `.py` and `.pyc` files, and never collect `.pyc` files from the `__pycache__` directory. Update the description to note that module collection mode is preferable way of ensuring that source .py files are collected (in addition or in lieu to byte-compiled modules in PYZ). Adjust the `test_collect_data_all_included` accordingly.
- Loading branch information
Showing
4 changed files
with
98 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The collection of "py files", enabled by the ``include_py_files=True`` | ||
argument to the :func:`PyInstaller.utils.hooks.collect_data_files` hook | ||
utility function, is now restricted to only ``.py`` and ``.pyc`` files. | ||
Previously, all suffices from ``importlib.machinery.all_suffices``were | ||
enabled, which resulted in spurious collection of dynamic libraries and | ||
extensions (due to ``.so``, ``.abi3.so``, ``.pyd``, etc. being among | ||
those suffices). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The :func:`PyInstaller.utils.hooks.collect_data_files` hook utility | ||
helper does not collect ``.pyc`` files from ``__pycache__`` directories | ||
anymore, even with ``include_py_files=True`` argument. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters