xywechatpad-binary 0.2__tar.gz
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.
- xywechatpad_binary-0.2/PKG-INFO +31 -0
- xywechatpad_binary-0.2/README.md +3 -0
- xywechatpad_binary-0.2/pyproject.toml +3 -0
- xywechatpad_binary-0.2/setup.cfg +4 -0
- xywechatpad_binary-0.2/setup.py +53 -0
- xywechatpad_binary-0.2/xywechatpad_binary/__init__.py +56 -0
- xywechatpad_binary-0.2/xywechatpad_binary.egg-info/PKG-INFO +31 -0
- xywechatpad_binary-0.2/xywechatpad_binary.egg-info/SOURCES.txt +8 -0
- xywechatpad_binary-0.2/xywechatpad_binary.egg-info/dependency_links.txt +1 -0
- xywechatpad_binary-0.2/xywechatpad_binary.egg-info/top_level.txt +1 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: xywechatpad-binary
|
3
|
+
Version: 0.2
|
4
|
+
Summary: XYBotV2 Binary Distribution
|
5
|
+
Home-page: https://github.com/HenryXiaoYang/xywechatpad-binary
|
6
|
+
Author: HenryXiaoYang
|
7
|
+
Author-email: henryyang666@hotmail.com
|
8
|
+
Platform: Linux-x86_64
|
9
|
+
Platform: Linux-aarch64
|
10
|
+
Platform: macosx-x86_64
|
11
|
+
Platform: macosx-arm64
|
12
|
+
Platform: Windows-x86_64
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
15
|
+
Classifier: Operating System :: MacOS
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
17
|
+
Requires-Python: >=3.11
|
18
|
+
Description-Content-Type: text/markdown
|
19
|
+
Dynamic: author
|
20
|
+
Dynamic: author-email
|
21
|
+
Dynamic: classifier
|
22
|
+
Dynamic: description
|
23
|
+
Dynamic: description-content-type
|
24
|
+
Dynamic: home-page
|
25
|
+
Dynamic: platform
|
26
|
+
Dynamic: requires-python
|
27
|
+
Dynamic: summary
|
28
|
+
|
29
|
+
# XYWechatPad Binary Distribution
|
30
|
+
|
31
|
+
Binary distribution for XYBotV2
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import sys
|
2
|
+
import platform
|
3
|
+
from setuptools import setup, find_packages
|
4
|
+
|
5
|
+
# 平台检测
|
6
|
+
system = platform.system().lower()
|
7
|
+
machine = platform.machine().lower()
|
8
|
+
|
9
|
+
# 确定当前平台的二进制路径
|
10
|
+
BINARY_PATH = ""
|
11
|
+
if system == "linux":
|
12
|
+
if machine in ["x86_64", "amd64"]:
|
13
|
+
BINARY_PATH = "binaries/linux_x64/XYBotWechatPad"
|
14
|
+
elif machine == "aarch64":
|
15
|
+
BINARY_PATH = "binaries/linux_aarch64/XYBotWechatPad"
|
16
|
+
elif system == "darwin": # macOS
|
17
|
+
if machine == "arm64":
|
18
|
+
BINARY_PATH = "binaries/macos_arm64/XYBotWechatPad"
|
19
|
+
elif machine == "x86_64":
|
20
|
+
BINARY_PATH = "binaries/macos_x64/XYBotWechatPad"
|
21
|
+
elif system == "windows":
|
22
|
+
BINARY_PATH = "binaries/win_x64/XYBotWechatPad.exe"
|
23
|
+
|
24
|
+
# 版本检查
|
25
|
+
if sys.version_info < (3, 11):
|
26
|
+
raise RuntimeError("Requires Python 3.11 or higher")
|
27
|
+
|
28
|
+
setup(
|
29
|
+
name="xywechatpad-binary",
|
30
|
+
version="0.2",
|
31
|
+
author="HenryXiaoYang",
|
32
|
+
author_email="henryyang666@hotmail.com",
|
33
|
+
description="XYBotV2 Binary Distribution",
|
34
|
+
long_description=open("README.md").read(),
|
35
|
+
long_description_content_type="text/markdown",
|
36
|
+
url="https://github.com/HenryXiaoYang/xywechatpad-binary",
|
37
|
+
packages=find_packages(),
|
38
|
+
package_data={"xywechatpad_binary": [BINARY_PATH]},
|
39
|
+
classifiers=[
|
40
|
+
"Programming Language :: Python :: 3",
|
41
|
+
"Operating System :: POSIX :: Linux",
|
42
|
+
"Operating System :: MacOS",
|
43
|
+
"Operating System :: Microsoft :: Windows",
|
44
|
+
],
|
45
|
+
python_requires='>=3.11',
|
46
|
+
platforms=[
|
47
|
+
"Linux-x86_64",
|
48
|
+
"Linux-aarch64",
|
49
|
+
"macosx-x86_64",
|
50
|
+
"macosx-arm64",
|
51
|
+
"Windows-x86_64"
|
52
|
+
]
|
53
|
+
)
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import platform
|
2
|
+
import shutil
|
3
|
+
from pathlib import Path
|
4
|
+
|
5
|
+
def copy_binary(target_dir: Path) -> Path:
|
6
|
+
"""
|
7
|
+
将当前平台的二进制文件复制到指定目录
|
8
|
+
:param target_dir: 必须存在的目标目录
|
9
|
+
:return: 复制后的完整文件路径
|
10
|
+
:raises FileNotFoundError: 当目标目录不存在时
|
11
|
+
:raises OSError: 平台不受支持时
|
12
|
+
"""
|
13
|
+
system = platform.system().lower()
|
14
|
+
machine = platform.machine().lower()
|
15
|
+
|
16
|
+
# 平台到二进制路径的映射
|
17
|
+
BIN_MAP = {
|
18
|
+
"linux": {
|
19
|
+
"x86_64": "binaries/linux_x64/XYBotWechatPad",
|
20
|
+
"amd64": "binaries/linux_x64/XYBotWechatPad",
|
21
|
+
"aarch64": "binaries/linux_aarch64/XYBotWechatPad"
|
22
|
+
},
|
23
|
+
"darwin": { # macOS
|
24
|
+
"x86_64": "binaries/macos_x64/XYBotWechatPad",
|
25
|
+
"arm64": "binaries/macos_arm64/XYBotWechatPad"
|
26
|
+
},
|
27
|
+
"windows": {
|
28
|
+
"x86_64": "binaries/win_x64/XYBotWechatPad.exe",
|
29
|
+
"amd64": "binaries/win_x64/XYBotWechatPad.exe"
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
# 验证平台支持
|
34
|
+
if system not in BIN_MAP or machine not in BIN_MAP[system]:
|
35
|
+
raise OSError(f"Unsupported platform: {system}-{machine}")
|
36
|
+
|
37
|
+
# 获取源文件路径
|
38
|
+
src_path = Path(__file__).parent / BIN_MAP[system][machine]
|
39
|
+
if not src_path.exists():
|
40
|
+
raise FileNotFoundError(f"Binary not found: {src_path}")
|
41
|
+
|
42
|
+
# 验证目标目录
|
43
|
+
if not target_dir.is_dir():
|
44
|
+
raise FileNotFoundError(f"Target directory does not exist: {target_dir}")
|
45
|
+
|
46
|
+
# 构建目标路径
|
47
|
+
dest_path = target_dir / src_path.name
|
48
|
+
|
49
|
+
# 执行复制
|
50
|
+
shutil.copy2(src_path, dest_path)
|
51
|
+
|
52
|
+
# 设置可执行权限(非Windows)
|
53
|
+
if system != "windows":
|
54
|
+
dest_path.chmod(0o755)
|
55
|
+
|
56
|
+
return dest_path
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: xywechatpad-binary
|
3
|
+
Version: 0.2
|
4
|
+
Summary: XYBotV2 Binary Distribution
|
5
|
+
Home-page: https://github.com/HenryXiaoYang/xywechatpad-binary
|
6
|
+
Author: HenryXiaoYang
|
7
|
+
Author-email: henryyang666@hotmail.com
|
8
|
+
Platform: Linux-x86_64
|
9
|
+
Platform: Linux-aarch64
|
10
|
+
Platform: macosx-x86_64
|
11
|
+
Platform: macosx-arm64
|
12
|
+
Platform: Windows-x86_64
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
15
|
+
Classifier: Operating System :: MacOS
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
17
|
+
Requires-Python: >=3.11
|
18
|
+
Description-Content-Type: text/markdown
|
19
|
+
Dynamic: author
|
20
|
+
Dynamic: author-email
|
21
|
+
Dynamic: classifier
|
22
|
+
Dynamic: description
|
23
|
+
Dynamic: description-content-type
|
24
|
+
Dynamic: home-page
|
25
|
+
Dynamic: platform
|
26
|
+
Dynamic: requires-python
|
27
|
+
Dynamic: summary
|
28
|
+
|
29
|
+
# XYWechatPad Binary Distribution
|
30
|
+
|
31
|
+
Binary distribution for XYBotV2
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
xywechatpad_binary
|