Skip to content

Commit

Permalink
[PyOV] Fix bugbear's B023 (openvinotoolkit#12040)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Iwaszkiewicz authored and ilya-lavrenov committed Jul 25, 2022
1 parent f076498 commit 6bf2e90
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/bindings/python/wheel/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@ def configure(self, install_cfg):
self.announce(f'Installing {comp}', level=3)
self.spawn(['cmake', '--install', CMAKE_BUILD_DIR, '--prefix', install_prefix, '--component', comp_data.get('name')])
# set rpath if applicable
if sys.platform != 'win32' and comp_data.get('rpath'):
file_types = ['.so'] if sys.platform == 'linux' else ['.dylib', '.so']
for path in filter(lambda p: any(item in file_types for item in p.suffixes), Path(install_dir).glob('*')):
set_rpath(comp_data['rpath'], os.path.realpath(path))
if sys.platform != "win32" and comp_data.get("rpath"):
for path in filter(
lambda x: any(item in ([".so"] if sys.platform == "linux" else [".dylib", ".so"]) for item in x.suffixes), Path(install_dir).glob("*"),
):
set_rpath(comp_data["rpath"], os.path.realpath(path))

def generate_package(self, src_dirs):
"""
Expand Down

0 comments on commit 6bf2e90

Please sign in to comment.