numbox 0.2.12__py3-none-any.whl → 0.2.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of numbox might be problematic. Click here for more details.

numbox/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.2.12'
1
+ __version__ = '0.2.13'
@@ -1,6 +1,9 @@
1
1
  from ctypes import CDLL
2
2
  from ctypes.util import find_library
3
- from os import RTLD_GLOBAL
3
+ from platform import system
4
+
5
+
6
+ platform_ = system()
4
7
 
5
8
 
6
9
  def load_lib(name):
@@ -9,5 +12,24 @@ def load_lib(name):
9
12
  mostly just prefixes `lib` and suffixes extension.
10
13
  When adding (custom) libraries to the global symbol
11
14
  scope, consider setting `DYLD_LIBRARY_PATH`."""
12
- lib_path = find_library(name)
13
- _ = CDLL(lib_path, mode=RTLD_GLOBAL)
15
+ if platform_ in ("Darwin", "Linux"):
16
+ from os import RTLD_GLOBAL
17
+
18
+ lib_path = find_library(name)
19
+ _ = CDLL(lib_path, mode=RTLD_GLOBAL)
20
+ elif platform_ == "Windows":
21
+ from ctypes.util import find_msvcrt
22
+ if name in ("c", "m"):
23
+ lib_path = find_msvcrt()
24
+ if lib_path is not None:
25
+ _ = CDLL(lib_path, winmode=0)
26
+ else:
27
+ import ctypes
28
+ _ = ctypes.cdll.msvcrt
29
+ else:
30
+ lib_path = find_library(name)
31
+ if lib_path is None:
32
+ raise RuntimeError(f"Could not find shared library for {name}")
33
+ _ = CDLL(lib_path, winmode=0)
34
+ else:
35
+ raise RuntimeError(f"Platform {platform_} is not supported, yet.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: numbox
3
- Version: 0.2.12
3
+ Version: 0.2.13
4
4
  Author: Mikhail Goykhman
5
5
  License: MIT License (with Citation Clause)
6
6
 
@@ -1,4 +1,4 @@
1
- numbox/__init__.py,sha256=GOlqYpAbeXBU8pYgXsAgMtKusKeeO1iC_GrwyupHF50,23
1
+ numbox/__init__.py,sha256=y7T0aODMp6lh_FsLCIWZvm04exJp-NxszVrIpCH9tLE,23
2
2
  numbox/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  numbox/core/configurations.py,sha256=0bCmxXL-QMwtvyIDhpXLeT-1KJMf_QpH0wLuEvYLGxQ,68
4
4
  numbox/core/any/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -11,7 +11,7 @@ numbox/core/bindings/_math.py,sha256=6iZ_YyW1pVg-wVRA-tUqpFg2gXsB7AiHxvVxvYkDr14
11
11
  numbox/core/bindings/_sqlite.py,sha256=HeZHQuVn5PlVxPSIvXTmwSYZUtxl3N7SD35-ozdE6OY,637
12
12
  numbox/core/bindings/call.py,sha256=LrSsp-b4Mz0Zjg7H3XkThEIOEqVcrcViEjI9yqhuMV4,1710
13
13
  numbox/core/bindings/signatures.py,sha256=OcSBDpJ422eoWkJXxHPEanMNbVB7bq9f5bRq5LGr86w,479
14
- numbox/core/bindings/utils.py,sha256=aRtN8oUYBk9vgoUGaUJosGx0Za-vvCNwwbZg_g_-LRs,460
14
+ numbox/core/bindings/utils.py,sha256=OATfF4k8e5oPa9_wlHHkLQhY_DhrPNKYdeeGu9Nj5yg,1180
15
15
  numbox/core/proxy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  numbox/core/proxy/proxy.py,sha256=Wt7yzswDmeQXt0yjcTcnLi2coneowSHWXy_IFpZZJMU,3612
17
17
  numbox/core/work/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -33,8 +33,8 @@ numbox/utils/meminfo.py,sha256=ykFi8Vt0WcHI3ztgMwvpn6NqaflDSQGL8tjI01jrzm0,1759
33
33
  numbox/utils/standard.py,sha256=2fPrMlSXe2TG3CIfjJOT8LQkHEH86oOOj1AvwQkYCfA,450
34
34
  numbox/utils/timer.py,sha256=5_d690Fb3L2axJBRxtoB0qe23exBosNR4qu6cno4QfY,641
35
35
  numbox/utils/void_type.py,sha256=IkZsjNeAIShYJtvWbvERdHnl_mbF1rCRWiM3gp6II8U,404
36
- numbox-0.2.12.dist-info/LICENSE,sha256=YYgNvjH_p6-1NsdrIqGJnr1GUbZzA_8DxsP6vVfM6nY,1446
37
- numbox-0.2.12.dist-info/METADATA,sha256=mQ3tVgka3_U66CIkJl2kWMdd1ehHOxmJKNf2RETjoQ8,3126
38
- numbox-0.2.12.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
39
- numbox-0.2.12.dist-info/top_level.txt,sha256=A67jOkfqidCSYYm6ifjN_WZyIiR1B27fjxv6nNbPvjc,7
40
- numbox-0.2.12.dist-info/RECORD,,
36
+ numbox-0.2.13.dist-info/LICENSE,sha256=YYgNvjH_p6-1NsdrIqGJnr1GUbZzA_8DxsP6vVfM6nY,1446
37
+ numbox-0.2.13.dist-info/METADATA,sha256=McU-4PToPCstRO3MTlPHgsF0AWCGnOCFhw8nv2FddQU,3126
38
+ numbox-0.2.13.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
39
+ numbox-0.2.13.dist-info/top_level.txt,sha256=A67jOkfqidCSYYm6ifjN_WZyIiR1B27fjxv6nNbPvjc,7
40
+ numbox-0.2.13.dist-info/RECORD,,