Bug report
Bug description:
Currently, zipapp.create_archive makes the target application archive executable only if target is a str. (see snippets bellow).
I think the target application archive should be made executable also when target is os.PathLike.
# source.py
print("Hello from pyz")
# bug_reproduction.py
import os
import pathlib
import zipapp
import sys
zipapp.create_archive("source.py", "source.pyz")
zipapp.create_archive(
pathlib.Path("source.pyz"),
pathlib.Path("copy.pyz"),
interpreter=sys.executable,
)
zipapp.create_archive("source.pyz", "copy2.pyz", interpreter=sys.executable)
assert os.access("copy2.pyz", os.X_OK) # Passes
assert os.access("copy.pyz", os.X_OK) # Fails
CPython versions tested on:
CPython main branch, commit b0c9fc3
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
Currently,
zipapp.create_archivemakes the target application archive executable only if target is astr. (see snippets bellow).I think the target application archive should be made executable also when
targetisos.PathLike.CPython versions tested on:
CPython main branch, commit b0c9fc3
Operating systems tested on:
Linux
Linked PRs