Conversation
|
@gingerXue Please take a look first. Thanks! |
| mtmlLib = CDLL("libmtml.so") | ||
| except OSError as ose: | ||
| _mtmlCheckReturn(MTML_ERROR_FUNCTION_NOT_FOUND) | ||
| # Platform-specific library loading |
There was a problem hiding this comment.
I suggest that we need to split up the windows and linux loader logic. Maybe refactoring the loader into smaller, well-defined helper functions with clearer responsibilities.
| # Platform-specific library loading | ||
| platform = sys.platform | ||
|
|
||
| if platform.startswith("win32") or platform.startswith("cygwin"): |
| continue | ||
|
|
||
| # If all attempts failed, try with full path to mtml/mtml.dll | ||
| if mtmlLib is None and (platform.startswith("win32") or platform.startswith("cygwin")): |
| ```bash | ||
| # 检查 libmtml.so 是否可用 | ||
| # 检查 MTML 库是否可用 | ||
| ldconfig -p | grep libmtml |
There was a problem hiding this comment.
On Windows, there is no ldconfig mechanism like Linux, please add the checking command like: where mtml.dll
| @@ -0,0 +1,32 @@ | |||
| from pymtml import * | |||
There was a problem hiding this comment.
Maybe no need to add this test file. It is the same as test_pymtml.py
There was a problem hiding this comment.
@xinye0123 You can run the tests under https://github.com/MooreThreads/mthreads-ml-py/tree/main/examples to verify that everything works properly on Windows.
|
@xinye0123 I refine the code and doc, Please take a look: https://github.com/gingerXue/mthreads-ml-py/tree/supportwin |
|
不好意思,我只是看到pypi上的包还不支持win才提的pr,git不怎么会用哈,还是要靠大家完善,加油哦 |
好的,没问题,那我们来做吧。谢谢! |
added windows support #8 (mtml.dll has installed to win's/system32 fold)