mirror of
https://github.com/frida/frida-python.git
synced 2026-11-07 09:35:57 -10:00
setup: Find generated files next to the extension
The prebuilt wheel path installs the generated __init__.py, aio.py and _frida.pyi alongside the extension, not under build/frida/, so copy them from there.
This commit is contained in:
1 parent
e17e55a8f5
commit
dc5f78e660
1 file changed
+3
-4
@@ -114,7 +114,7 @@ class FridaPrebuiltExt(build_ext):
|
||||
target = self.get_ext_fullpath(ext.name)
|
||||
Path(target).parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy(FRIDA_EXTENSION, target)
|
||||
copy_generated_package(self.build_lib)
|
||||
copy_generated_package(self.build_lib, Path(FRIDA_EXTENSION).parent)
|
||||
|
||||
|
||||
class FridaDemandBuiltExt(build_ext):
|
||||
@@ -131,11 +131,10 @@ class FridaDemandBuiltExt(build_ext):
|
||||
target = self.get_ext_fullpath(ext.name)
|
||||
Path(target).parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy(outputs[0], target)
|
||||
copy_generated_package(self.build_lib)
|
||||
copy_generated_package(self.build_lib, SOURCE_ROOT / "build" / "frida")
|
||||
|
||||
|
||||
def copy_generated_package(build_lib):
|
||||
generated = SOURCE_ROOT / "build" / "frida"
|
||||
def copy_generated_package(build_lib, generated):
|
||||
destination = Path(build_lib) / "frida"
|
||||
destination.mkdir(parents=True, exist_ok=True)
|
||||
for name in GENERATED_PACKAGE_FILES:
|
||||
|
||||
Reference in new issue
Block a user