Skip to content

Commit

Permalink
action
Browse files Browse the repository at this point in the history
  • Loading branch information
dagou committed Sep 4, 2024
1 parent a802a21 commit 687b751
Show file tree
Hide file tree
Showing 3 changed files with 6,964 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: --release --out dist --target ${{ matrix.target }} --find-interpreter
args: --release --out dist
sccache: 'true'
manylinux: auto
env:
Expand Down
31 changes: 31 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import json

def check_python_version(json_file, version_prefix, platform):
with open(json_file, 'r') as f:
data = json.load(f)

versions = []
for item in data:
if item['version'].startswith(version_prefix):
for file in item['files']:
if file['platform'] == platform:
versions.append((item['version'], file['arch']))
return versions

# 假设 JSON 文件保存为 'python_versions.json'
json_file = 'version.json'

# 检查所有平台的 Python 版本
platforms = ["win32", "darwin", "linux"]
versions_to_check = ["3.7", "3.8", "3.9", "3.10", "3.11"]

for platform in platforms:
print(f"\nChecking versions for {platform}:")
for version in versions_to_check:
supported = check_python_version(json_file, version, platform)
if supported:
print(f" Python {version} versions available:")
for ver, arch in supported:
print(f" Version: {ver}, Architecture: {arch}")
else:
print(f" No Python {version} versions found for {platform}")
Loading

0 comments on commit 687b751

Please sign in to comment.