Skip to content

Commit

Permalink
Add support for 32-bit Linux systems
Browse files Browse the repository at this point in the history
All 64-bit pxlib binaries now have the _x64 suffix for consistency.
32-bit macOS systems are not supported and will generate an exception during the library load (libpx.dylib does not exist). This behaviour is consistent with the previous pypxlib release.
  • Loading branch information
matt-baker-agd-systems committed Apr 20, 2020
1 parent 3944359 commit 2495b3b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
Binary file modified pypxlib/pxlib_ctypes/libpx.so
Binary file not shown.
File renamed without changes.
Binary file added pypxlib/pxlib_ctypes/libpx_x64.so
Binary file not shown.
10 changes: 9 additions & 1 deletion pypxlib/pxlib_ctypes/py2.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,15 @@ def add_library_search_dirs(other_dirs):

_is_64_bit = sys.maxsize > 2 ** 32

_px_lib = 'pxlib_x64' if sys.platform == 'win32' and _is_64_bit else 'px'
# Select the correct library for the platform and architecture
_px_lib = None
if sys.platform == 'win32' and _is_64_bit:
_px_lib = 'pxlib_x64'
elif _is_64_bit:
_px_lib = 'px_x64'
else:
_px_lib = 'px'

_libs["px"] = load_library(_px_lib)

# 1 libraries
Expand Down
10 changes: 9 additions & 1 deletion pypxlib/pxlib_ctypes/py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,15 @@ def add_library_search_dirs(other_dirs):

_is_64_bit = sys.maxsize > 2 ** 32

_px_lib = 'pxlib_x64' if sys.platform == 'win32' and _is_64_bit else 'px'
# Select the correct library for the platform and architecture
_px_lib = None
if sys.platform == 'win32' and _is_64_bit:
_px_lib = 'pxlib_x64'
elif _is_64_bit:
_px_lib = 'px_x64'
else:
_px_lib = 'px'

_libs["px"] = load_library(_px_lib)

# 1 libraries
Expand Down

0 comments on commit 2495b3b

Please sign in to comment.