You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pip installs a wheel with custom scripts that have a .py extension, it creates corresponding .pyc files. This pollutes the bin directory, and doesn't accomplish anything, since I don't think Python loads .pyc files for scripts.
Expected behavior
Now granted, the wheel spec does say:
Compile any installed .py to .pyc. (Uninstallers should be smart enough to remove .pyc even if it is not mentioned in RECORD.)
(emphasis mine)
But I think common sense suggests that only .py files in the purelib and platlib directories should be compiled.
IMO, this isn't worth worrying about. It should be rare (these days, entry points are recommended over scripts anyway) and it doesn't cause any real problem, just clutter.
Having said that, if someone were to create a PR, it could be considered.
Description
When pip installs a wheel with custom scripts that have a
.py
extension, it creates corresponding.pyc
files. This pollutes thebin
directory, and doesn't accomplish anything, since I don't think Python loads.pyc
files for scripts.Expected behavior
Now granted, the wheel spec does say:
(emphasis mine)
But I think common sense suggests that only
.py
files in the purelib and platlib directories should be compiled.pip version
22.2.2
Python version
3.10.4
OS
Ubuntu 22.04
How to Reproduce
Install
docutils
, then look in thebin
directory.Output
Code of Conduct
The text was updated successfully, but these errors were encountered: