Skip to content

Commit 143b7d0

Browse files
committed
update
1 parent 4280ff0 commit 143b7d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
# Import this before distutils so that setuptools can intercept the distuils
5757
# imports.
5858
import setuptools # noqa: F401 # usort: skip
59+
import importlib.machinery
5960
import os
6061
import platform
6162
import subprocess
@@ -662,6 +663,14 @@ def run(self):
662663
"share/cmake/executorch-config.cmake",
663664
),
664665
]
666+
# Pick up all .so files automatically
667+
ext_suffixes = importlib.machinery.EXTENSION_SUFFIXES
668+
for suffix in ext_suffixes:
669+
for so_file in Path("backends/qualcomm/python").glob(f"*{suffix}"):
670+
rel_dst = os.path.join(
671+
"executorch/backends/qualcomm/python", so_file.name
672+
)
673+
src_to_dst.append((str(so_file), rel_dst))
665674
# Copy all the necessary headers into include/executorch/ so that they can
666675
# be found in the pip package. This is the subset of headers that are
667676
# essential for building custom ops extensions.

0 commit comments

Comments
 (0)