Fix packaging trying to modify unrelated files
`package()` method in `setup.py` tries to compile and chmod all files under the directory given by `--prefix PREFIX`. If PREFIX is a directory containing other distributions (like `/usr/local` or `$HOME/.local`), then it would try to compile - using possibly the wrong python version - and chmod all files within PREFIX.
This commit is contained in:
parent
efd9843920
commit
bd741365cb
4
setup.py
4
setup.py
@ -516,8 +516,8 @@ def package(args, for_bundle=False, sh_launcher=False): # {{{
|
||||
shutil.copytree('kitty', os.path.join(libdir, 'kitty'), ignore=src_ignore)
|
||||
shutil.copytree('kittens', os.path.join(libdir, 'kittens'), ignore=src_ignore)
|
||||
import compileall
|
||||
compileall.compile_dir(ddir, quiet=1, workers=4)
|
||||
for root, dirs, files in os.walk(ddir):
|
||||
compileall.compile_dir(libdir, quiet=1, workers=4)
|
||||
for root, dirs, files in os.walk(libdir):
|
||||
for f in files:
|
||||
path = os.path.join(root, f)
|
||||
os.chmod(path, 0o755 if f.endswith('.so') else 0o644)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user