Skip to content

Commit

Permalink
update pylon lib naming
Browse files Browse the repository at this point in the history
  • Loading branch information
thiesmoeller committed Oct 16, 2024
1 parent ce1517a commit 517d3f8
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -768,6 +768,36 @@ class BuildSupportLinux(BuildSupport):
],
}

# match those shared objects without symlinks directly and where there are
# symlinks, match the first one (*.so.<major>)
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 = {
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit 517d3f8

Please sign in to comment.