rm-lines-sys 1.0.2__py3-none-win_amd64.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.
rm_lines_sys/__init__.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import ctypes
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
from logging import Logger
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
logger = Logger("rm_lines_sys")
|
|
8
|
+
MODULE_FOLDER = os.path.dirname(os.path.abspath(__file__))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def load_lib() -> Optional[ctypes.CDLL]:
|
|
12
|
+
lib_name = {
|
|
13
|
+
'win32': 'rm_lines.dll',
|
|
14
|
+
'linux': 'librm_lines.so',
|
|
15
|
+
'darwin': 'librm_lines.dylib'
|
|
16
|
+
}.get(sys.platform)
|
|
17
|
+
|
|
18
|
+
if not lib_name:
|
|
19
|
+
logger.error(f"Unsupported platform: {sys.platform}")
|
|
20
|
+
return None
|
|
21
|
+
|
|
22
|
+
lib_path = os.path.join(MODULE_FOLDER, lib_name)
|
|
23
|
+
|
|
24
|
+
if not os.path.exists(lib_path):
|
|
25
|
+
logger.error(f"Library file not found, path: {lib_path}")
|
|
26
|
+
return None
|
|
27
|
+
|
|
28
|
+
if sys.platform == 'win32':
|
|
29
|
+
_lib = ctypes.WinDLL(lib_path)
|
|
30
|
+
else:
|
|
31
|
+
_lib = ctypes.CDLL(lib_path)
|
|
32
|
+
|
|
33
|
+
# Add function signatures
|
|
34
|
+
|
|
35
|
+
# Function buildTree(int) -> str
|
|
36
|
+
_lib.buildTree.argtypes = [ctypes.c_int]
|
|
37
|
+
_lib.buildTree.restype = ctypes.c_char_p
|
|
38
|
+
|
|
39
|
+
# Function convertToJson(str, int) -> bool
|
|
40
|
+
_lib.convertToJson.argtypes = [ctypes.c_char_p, ctypes.c_int]
|
|
41
|
+
_lib.convertToJson.restype = ctypes.c_bool
|
|
42
|
+
|
|
43
|
+
# Function convertToSvg(str, int) -> bool
|
|
44
|
+
_lib.convertToSvg.argtypes = [ctypes.c_char_p, ctypes.c_int]
|
|
45
|
+
_lib.convertToSvg.restype = ctypes.c_bool
|
|
46
|
+
return _lib
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
lib: Optional[ctypes.CDLL] = load_lib()
|
|
50
|
+
|
|
51
|
+
__all__ = ['lib']
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: rm_lines_sys
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: This project holds the dynamic library and bindings for python.
|
|
5
|
+
Author: RedTTG
|
|
6
|
+
Author-email: red@redttg.com
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# Lib rMLines sys
|
|
17
|
+
|
|
18
|
+
This project holds the dynamic library and bindings for python.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
rm_lines_sys/__init__.py,sha256=CmArTmXxd873ujCcHI4vO30HS6pnfY1L9s3Li5YQyUs,1379
|
|
2
|
+
rm_lines_sys/rm_lines.dll,sha256=gwjrn-C1bEU09yW5eibvhyDEPa0ksHjh7o19ZbxcRCQ,368128
|
|
3
|
+
rm_lines_sys-1.0.2.dist-info/METADATA,sha256=fl26w6GEAH_72jSMgx-HZ7BNkzDbEkq8nwy62oS7yIM,622
|
|
4
|
+
rm_lines_sys-1.0.2.dist-info/WHEEL,sha256=Kn3EkmcbYRgKRrJQeKvGyHuRhSoy_2UDtAWgEJmQG8A,96
|
|
5
|
+
rm_lines_sys-1.0.2.dist-info/RECORD,,
|