aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Smearcheck <Mark.Smearcheck@us.af.mil>2017-04-20 15:48:53 -0400
committerMark Smearcheck <Mark.Smearcheck@us.af.mil>2017-04-20 15:57:24 -0400
commit2878f21605c0dc13e33bb89401cd5c335e9ea4e9 (patch)
tree13ad61fde456463f9c422fa0a4e8d0d2f8ff10c7
parent93b7fd6b4ff5a2acd1e4b53a7ffca141a63337df (diff)
downloadpymba-2878f21605c0dc13e33bb89401cd5c335e9ea4e9.tar.gz
pymba-2878f21605c0dc13e33bb89401cd5c335e9ea4e9.zip
Added armv7hf and aarch64 support, using code from @DanielArnett in #16
-rw-r--r--pymba/vimbadll.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/pymba/vimbadll.py b/pymba/vimbadll.py
index 7ba6e14..1ae7773 100644
--- a/pymba/vimbadll.py
+++ b/pymba/vimbadll.py
@@ -36,11 +36,34 @@ if sys_plat == "win32":
else:
dll_loader = cdll
- assert os.environ.get(
- "GENICAM_GENTL64_PATH"), "you need your GENICAM_GENTL64_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts"
- vimba_dir = "/".join(os.environ.get("GENICAM_GENTL64_PATH").split("/")
- [1:-3])
- vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/x86_64bit/libVimbaC.so"
+
+ if 'x86_64' in os.uname()[4]:
+ assert os.environ.get(
+ "GENICAM_GENTL64_PATH"), "you need your GENICAM_GENTL64_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts"
+ vimba_dir = "/".join(os.environ.get("GENICAM_GENTL64_PATH").split("/")
+ [1:-3])
+ vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/x86_64bit/libVimbaC.so"
+ elif 'x86_32' in os.uname()[4]:
+ print "Warning: x86_32 reached!"
+ assert os.environ.get(
+ "GENICAM_GENTL32_PATH"), "you need your GENICAM_GENTL32_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts"
+ vimba_dir = "/".join(os.environ.get("GENICAM_GENTL32_PATH").split("/")
+ [1:-3])
+ vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/x86_32bit/libVimbaC.so"
+ elif 'arm' in os.uname()[4]:
+ assert os.environ.get(
+ "GENICAM_GENTL32_PATH"), "you need your GENICAM_GENTL32_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts"
+ vimba_dir = "/".join(os.environ.get("GENICAM_GENTL32_PATH").split("/")
+ [1:-3])
+ vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/arm_32bit/libVimbaC.so"
+ elif 'aarch64' in os.uname()[4]:
+ assert os.environ.get(
+ "GENICAM_GENTL64_PATH"), "you need your GENICAM_GENTL64_PATH environment set. Make sure you have Vimba installed, and you have loaded the /etc/profile.d/ scripts"
+ vimba_dir = "/".join(os.environ.get("GENICAM_GENTL64_PATH").split("/")
+ [1:-3])
+ vimbaC_path = "/" + vimba_dir + "/VimbaC/DynamicLib/arm_64bit/libVimbaC.so"
+ else:
+ raise ValueError("Pymba currently doesn't support %s" % os.uname()[4])
# Callback Function Type