diff options
| author | morefigs <morefigs@gmail.com> | 2017-05-05 11:34:11 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-05 11:34:11 +1000 |
| commit | 0702ee84b2c4b4a32376b1da11af80c9296262ad (patch) | |
| tree | 5eef780eb98053b1b9e5086c9f9245c96dc2b350 | |
| parent | feeb459b1b4184809d0f7833691234941aa077b6 (diff) | |
| parent | 2878f21605c0dc13e33bb89401cd5c335e9ea4e9 (diff) | |
| download | pymba-0702ee84b2c4b4a32376b1da11af80c9296262ad.tar.gz pymba-0702ee84b2c4b4a32376b1da11af80c9296262ad.zip | |
Merge pull request #45 from fearthesmear/vimba2_1
Added armv7hf and aarch64 support, using code from @DanielArnett in #16
| -rw-r--r-- | pymba/vimbadll.py | 33 |
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 |
