必须为 main.py
,安装后根据 info.json
中的名称重命名。
必须包含 requirements.txt
文件:
pygame
numpy
或无依赖:
# No such library needed
{
"name": "example",
"version": "1.0.0",
"author": "developer",
"description": "This is an example software package.",
"category": "example",
"tags": ["example", "example_tag"],
"min_python_version": "3.8",
"target_python_version": "3.12",
"compatible_os": "windows"
}
example
→ example.py
软件包(example.sap)
├── ? data
│ ├── ? config.json
├── ? resources
│ ├── ? example.png
├── ? depends
│ ├── ? module1.py
├── ? docs
│ ├── ? UserGuide.md
├── ! main.py
├── ! requirements.txt
├── ! info.json
├── ? README.md
使用 ZIP 格式打包,扩展名改为 .sap
必须兼容 Python 3.8,在 info.json
中指定版本要求。
#!/usr/bin/env python3
"""
@ Name: DE_NumGuess
@ Auther: ElofHew
@ Version: 2.3
@ Description: A simple number guessing game.
@ Date: 2025.01.01
"""
try:
# 可能出现的错误代码
except Exception as e:
print("Error:", e)
测试版本命名:example_beta
, example_alpha
使用 Shizuku 包管理器:
shizuku install example
shizuku remove example
规范仅供参考,开发者可根据实际情况调整。