pypa / installer

A low-level library for installing from a Python wheel distribution.
https://installer.readthedocs.io/
MIT License
126 stars 52 forks source link

Always set owner's read bit, in files written #140

Open pmp-p opened 2 years ago

pmp-p commented 2 years ago

on sys.platform=="emscripten" where oct(os.umask(0)) == 0o777 by default instead of 0o22 at https://github.com/pypa/installer/blob/70ae05bb25c66e621064f2c031a04ac1192be30b/src/installer/utils.py#L251 the execute bit is set but the user read one is lost making it impossible to preload libraries (.so). ( maybe make_file_loadable ? that set at least u+rx )

https://github.com/emscripten-core/emscripten/issues/17269

pradyunsg commented 2 years ago

Hmm... I'm wondering if this should be fixed in emscripten or if we should have a workaround here.

@pmp-p Any specific preferences around this?

pmp-p commented 2 years ago

well emscripten should be fixed, but installer should set both bits for file owner regardless of mask set for group/others.

pradyunsg commented 2 years ago

Fair enough. A PR fixing this, with tests would be very welcome!