Russell E. Owen wrote: > If .pyc files are to be shared, it seems essential to (by default) > generate them at install time and make them read-only for unprivileged > users. > > This in turn implies that we may have to give up some support for > dragging python modules into site-packages No, I don't think so. Currently, when you install a package (by whatever means) in a directory that's not writable by the people who will be running it, there are two possibilities: 1) Precompiled .pyc files are generated at installation time, which are then read-only to users. 2) No .pyc files are installed, in which case none can or will be created by users either, since they don't have write permission to the directory. None of this would change if __pycache__ directories were used. The only difference would be that there would be an additional mode for failure to create .pyc files, i.e. __pycache__ could be created but nothing could be written to it because of a umask issue. If you install in a shared site-packages by dragging, you already have to be careful about setting the permissions. You'd just have to be sure to extended that diligence to any contained __pycache__ directories. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4