Skip to content

Commit

Permalink
Add executable permission to vendor file
Browse files Browse the repository at this point in the history
  • Loading branch information
notjagan committed Nov 6, 2023
1 parent fb75446 commit 91952ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import shutil
import stat
from pathlib import Path
from typing import Generator, Optional
from zipfile import ZipFile
Expand Down Expand Up @@ -63,11 +64,12 @@ def run(self):
if isinstance(ext, PrecompiledExtension) and ext.path.name.endswith(
self.suffix()
):
dest = Path(self.build_lib) / ext.path.parent.relative_to(
dest = Path(self.build_lib) / ext.path.relative_to(
Path(__file__).parent.absolute()
)
dest.mkdir(parents=True, exist_ok=True)
shutil.copy(ext.path, dest)
dest.parent.mkdir(parents=True, exist_ok=True)
shutil.copy(ext.path, dest.parent)
dest.chmod(dest.stat().st_mode | stat.S_IEXEC)


def find_extensions(directory: Path) -> list[PrecompiledExtension]:
Expand Down

0 comments on commit 91952ab

Please sign in to comment.