From 517d3f851a643fa30ab539c99565a75a171ee0d5 Mon Sep 17 00:00:00 2001 From: Thies Moeller Date: Wed, 16 Oct 2024 11:29:32 +0200 Subject: [PATCH] update pylon lib naming --- setup.py | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index dfb56f6..ad60f8c 100755 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ class BuildSupport(object): } [ (get_platform(), get_machinewidth()) ] # Compatible swig versions - SwigVersions = ["4.0.0"] + SwigVersions = ["4.2.0", "4.2.1"] SwigOptions = [ "-c++", "-Wextra", @@ -768,6 +768,36 @@ class BuildSupportLinux(BuildSupport): ], } + # match those shared objects without symlinks directly and where there are + # symlinks, match the first one (*.so.) + RuntimeFiles_starting_9_0_3_215 = { + "base": [ + (r"libpylonbase\.so\.\d+", ""), + ], + "gige": [ + (r"libpylon_TL_gige\.so", ""), + (r"libgxapi\.so\.\d+\.\d+", "") + ], + "usb": [ + (r"libpylon_TL_usb\.so", ""), + (r"libuxapi\.so\.\d+\.\d+", ""), + ], + "camemu": [ + (r"libpylon_TL_camemu\.so", "") + ], + "extra": [ + (r"libpylonutility\.so\.\d+", ""), + (r"libpylonutilitypcl\.so\.\d+", ""), + ], + "gentl": [ + (r"libpylon_TL_gtc\.so", ""), + ], + "pylondataprocessing": [ + (r"libPylonDataProcessing\.so\.\d+", ""), + (r"libPylonDataProcessing.sig", ""), + (r"libPylonDataProcessingCore\.so\.\d+", ""), + ], + } PYLON_DATA_PROCESSING_VTOOLS_DIR = "pylondataprocessingplugins" RuntimeFolders = { @@ -807,11 +837,14 @@ def __init__(self): print("LibraryDirs:", self.LibraryDirs) # adjust runtime files according to pylon version - olden_days = self.get_pylon_version_tuple() <= (6, 3, 0, 18933) - add_runtime = ( - self.RuntimeFiles_up_to_6_3_0_18933 if olden_days - else self.RuntimeFiles_after_6_3_0_18933 - ) + version = self.get_pylon_version_tuple() + + if version <= (6, 3, 0, 18933): + add_runtime = self.RuntimeFiles_up_to_6_3_0_18933 + elif (6, 3, 0, 18933) < version < (9, 0, 3, 215): + add_runtime = self.RuntimeFiles_after_6_3_0_18933 + else: + add_runtime = self.RuntimeFiles_starting_9_0_3_215 for package in add_runtime: if package in self.RuntimeFiles: self.RuntimeFiles[package].extend(add_runtime[package])