Make explicit that we want *.py, *.pyc, *.pyo, and *.egg-info files
Remove the section Packaging:Python#Including pyos
Remove this line from the egginfo section: "Must: If egg-info files are generated by the module's build scripts they must be included in the package."
Both of those will be merged into this new section after Packaging:Python#Macros:
Files to include
When installing python modules we include several different types of files.
- *.py source files because they are used when generating tracebacks
- *.pyc and *.pyo byte compiled files
- python will try to create them at runtime if they don't exist which leads to spurious SELinux AVC denials in the logs
- If the system administrator invokes python with -OO, .pyos will be created with no docstrings. This can break some programs.
- *.egg-info files or directories. If these are generated by the module's build scripts they must be included in the package because they might be needed by other applications and modules at runtime.
Source files
Source files (*.py) must be included in the same packages as the byte-compiled versions of them.