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:
Ole André Vadla Ravnås authored and Ole André Vadla Ravnås committed 2026-07-16 19:44:06 +02:00
1 parent e17e55a8f5
commit dc5f78e660
1 file changed
+3 -4
+3 -4
View File
@@ -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: