pyinstaller / pyinstaller/pyinstaller
Why not run hooks.collect_data_files() by default for all modules or provide an option to do so
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 2k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 11
Description
In a series of import errors I have been facing in trying to freeze a django application, I was surprised to see how quickly I could solve the data file missing errors for a module (rest_framework) by using PyInstaller.utils.hooks.collect_data_files(..) method. I couldn't help wonder, what prevents from running this utility method on all the modules identified as part of the freeze process by default or atleast have an option in pyinstaller (if we are concerned about file sizes etc) to do so? If we have it as an option - then it could be specified in the trouble shooting doc - to try and run with that option to see if that solves the issues. This could prevent or reduce a lot of grief on user side and also prevent having additional import hooks either on user side or checked into PyInstaller that are just collecting data files. Thoughts ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PyInstaller.utils.hooks.collect_data_files(..) and how the freeze process identifies modules. Compare the proposed default behavior with an opt-in option, including file-size implications and the troubleshooting documentation. Done means a decided approach is implemented or documented with clear guidance for missing data files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100