ci: 3.8/3.9 仅提供纯 Python wheel, CI 矩阵回退 3.10-3.14

Windows runner 未安装 Python 3.8/3.9 (run 258 失败于 Python 3.8 is required)。
requires-python 维持 >=3.8: 3.8/3.9 用户安装 py3-none-any wheel, 功能一致;
pyd wheel 覆盖 runner 预装的 3.10-3.14。
This commit is contained in:
p40000043244@byd.com
2026-08-03 16:10:06 +08:00
parent d34861be93
commit 316f307034
4 changed files with 14 additions and 14 deletions
+7 -7
View File
@@ -95,11 +95,11 @@ jobs:
"DLP_IO_PACKAGE_VERSION=$packageVersion" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append "DLP_IO_PACKAGE_VERSION=$packageVersion" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
Write-Host "package source: $tag @ $headCommit" Write-Host "package source: $tag @ $headCommit"
- name: Test Python 3.8-3.14 - name: Test Python 3.10-3.14
shell: pwsh shell: pwsh
run: | run: |
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) { foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
& py "-$pythonVersion" --version & py "-$pythonVersion" --version
if ($LASTEXITCODE -ne 0) { throw "Python $pythonVersion is required" } if ($LASTEXITCODE -ne 0) { throw "Python $pythonVersion is required" }
& py "-$pythonVersion" -m pip install -r requirements-dev.txt --progress-bar off & py "-$pythonVersion" -m pip install -r requirements-dev.txt --progress-bar off
@@ -124,7 +124,7 @@ jobs:
"dlp_io-$version-py3-none-any.whl", "dlp_io-$version-py3-none-any.whl",
"dlp_io-$version.tar.gz" "dlp_io-$version.tar.gz"
) )
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) { foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
$abi = $pythonVersion.Replace(".", "") $abi = $pythonVersion.Replace(".", "")
$wheel = "dlp_io-$version-cp$abi-cp$abi-win_amd64.whl" $wheel = "dlp_io-$version-cp$abi-cp$abi-win_amd64.whl"
$env:DLP_IO_PYD = "1" $env:DLP_IO_PYD = "1"
@@ -164,7 +164,7 @@ jobs:
} }
} }
$bareAssets = @(Get-ChildItem -LiteralPath $assetsDir -File | ForEach-Object Name) $bareAssets = @(Get-ChildItem -LiteralPath $assetsDir -File | ForEach-Object Name)
if ($bareAssets.Count -ne 8) { if ($bareAssets.Count -ne 6) {
throw "bare asset set mismatch: $($bareAssets -join ', ')" throw "bare asset set mismatch: $($bareAssets -join ', ')"
} }
@@ -198,7 +198,7 @@ jobs:
} }
} }
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) { foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
$abi = $pythonVersion.Replace(".", "") $abi = $pythonVersion.Replace(".", "")
$pydWheel = (Resolve-Path (Join-Path dist "dlp_io-$($env:DLP_IO_PACKAGE_VERSION)-cp$abi-cp$abi-win_amd64.whl")).Path $pydWheel = (Resolve-Path (Join-Path dist "dlp_io-$($env:DLP_IO_PACKAGE_VERSION)-cp$abi-cp$abi-win_amd64.whl")).Path
$pydRoot = Join-Path $env:TEMP ("dlp-io-pyd-smoke-$abi-" + $PID) $pydRoot = Join-Path $env:TEMP ("dlp-io-pyd-smoke-$abi-" + $PID)
@@ -232,7 +232,7 @@ jobs:
throw "unsafe bare smoke path: $bareRootFull" throw "unsafe bare smoke path: $bareRootFull"
} }
try { try {
foreach ($pythonVersion in @("3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14")) { foreach ($pythonVersion in @("3.10", "3.11", "3.12", "3.13", "3.14")) {
$abi = $pythonVersion.Replace(".", "") $abi = $pythonVersion.Replace(".", "")
$sandbox = Join-Path $bareRootFull "cp$abi" $sandbox = Join-Path $bareRootFull "cp$abi"
New-Item -ItemType Directory -Force $sandbox | Out-Null New-Item -ItemType Directory -Force $sandbox | Out-Null
@@ -293,7 +293,7 @@ jobs:
"## 产物", "## 产物",
"", "",
"- ``dlp_io-$version-py3-none-any.whl``:纯 Python wheelpip 安装,跨平台", "- ``dlp_io-$version-py3-none-any.whl``:纯 Python wheelpip 安装,跨平台",
"- ``dlp_io-$version-cp3XX-cp3XX-win_amd64.whl``pyd wheelpip 安装,Windows 按解释器版本选用(cp38-cp314", "- ``dlp_io-$version-cp3XX-cp3XX-win_amd64.whl``pyd wheelpip 安装,Windows 按解释器版本选用(cp310-cp3143.8/3.9 请用纯 Python wheel",
"- ``dlp_io-$version.tar.gz``sdist 源码包", "- ``dlp_io-$version.tar.gz``sdist 源码包",
"- ``dlp_io.py`` / ``dlp_io.cp3XX-win_amd64.pyd``:免安装单文件,直接放进项目目录即可 ``import dlp_io``", "- ``dlp_io.py`` / ``dlp_io.cp3XX-win_amd64.pyd``:免安装单文件,直接放进项目目录即可 ``import dlp_io``",
"", "",
+3 -3
View File
@@ -35,7 +35,7 @@ io-compatible file reads through an approved Python helper on Windows DLP hosts.
py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io
``` ```
pip 会自动选择最匹配的 wheelWindows 上 CPython 3.83.14 安装对应的 pyd wheel(整个库由 Cython 编译为单个 `.pyd`),其余环境安装纯 Python wheel。如需固定版本: pip 会自动选择最匹配的 wheelWindows 上 CPython 3.103.14 安装对应的 pyd wheel(整个库由 Cython 编译为单个 `.pyd`),3.8/3.9 及其余环境安装纯 Python wheel(库要求 Python >= 3.8。如需固定版本:
```powershell ```powershell
py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io==0.1.1 py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io==0.1.1
@@ -52,10 +52,10 @@ pytest
## 构建发布 ## 构建发布
发布流程由 `.gitea/workflows/publish-dlp-io.yaml` 驱动:推送 `dlp-io-vX.Y.Z` 格式的 annotated tagWindows runnerPython 3.8–3.14)会自动完成测试、构建,并把产物上传到 Gitea Release 发布流程由 `.gitea/workflows/publish-dlp-io.yaml` 驱动:推送 `dlp-io-vX.Y.Z` 格式的 annotated tagWindows runnerPython 3.10–3.14)会自动完成测试、构建,并把产物上传到 Gitea Release
- `dlp_io-X.Y.Z-py3-none-any.whl`(纯 Python,跨平台) - `dlp_io-X.Y.Z-py3-none-any.whl`(纯 Python,跨平台)
- `dlp_io-X.Y.Z-cp38``cp314-win_amd64.whl`7 个 pyd wheelCython 编译,Windows 按解释器版本选用) - `dlp_io-X.Y.Z-cp310``cp314-win_amd64.whl`5 个 pyd wheelCython 编译,Windows 按解释器版本选用3.8/3.9 使用纯 Python wheel
- `dlp_io-X.Y.Z.tar.gz`sdist - `dlp_io-X.Y.Z.tar.gz`sdist
- `dlp_io.py` 和 5 个裸 `dlp_io.cp3XX-win_amd64.pyd`(免安装单文件,放进项目目录即可 import) - `dlp_io.py` 和 5 个裸 `dlp_io.cp3XX-win_amd64.pyd`(免安装单文件,放进项目目录即可 import)
+3 -3
View File
@@ -10,7 +10,7 @@ DLP 环境的实测特征(白名单矩阵、密文样本字节对比、各写
### 方式一:Gitea PyPI registry(推荐) ### 方式一:Gitea PyPI registry(推荐)
registry 已开放匿名下载,一条命令即可安装;pip 会自动选择最匹配的 wheelWindows 上 CPython 3.83.14 会得到对应的 pyd wheel(整个库编译为单个 `.pyd`),其余环境得到纯 Python wheel。 registry 已开放匿名下载,一条命令即可安装;pip 会自动选择最匹配的 wheelWindows 上 CPython 3.103.14 会得到对应的 pyd wheel(整个库编译为单个 `.pyd`),3.8/3.9 及其余环境得到纯 Python wheel(库要求 Python >= 3.8pyd 版仅覆盖 CI 预装的解释器版本)
```powershell ```powershell
py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io==0.3.0 py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io==0.3.0
@@ -27,9 +27,9 @@ Release 页面:<https://gitea.docker.antior.cn/antior/dlp-io/releases>
每个版本包含以下文件: 每个版本包含以下文件:
- `dlp_io-X.Y.Z-py3-none-any.whl`:纯 Python wheel,适用于任何 CPython >= 3.8 环境。 - `dlp_io-X.Y.Z-py3-none-any.whl`:纯 Python wheel,适用于任何 CPython >= 3.8 环境。
- `dlp_io-X.Y.Z-cp38-cp38-win_amd64.whl``cp314`pyd wheelWindows 专用,按解释器版本区分;整个库由 Cython 编译为单个二进制 `.pyd`,功能与纯 Python 版完全一致,可按对源码保护的要求选用。 - `dlp_io-X.Y.Z-cp310-cp310-win_amd64.whl``cp314`pyd wheelWindows 专用,按解释器版本区分;整个库由 Cython 编译为单个二进制 `.pyd`,功能与纯 Python 版完全一致,可按对源码保护的要求选用。3.8/3.9 无 pyd wheel,使用纯 Python wheel。
- `dlp_io-X.Y.Z.tar.gz`sdist 源码包。 - `dlp_io-X.Y.Z.tar.gz`sdist 源码包。
- `dlp_io.py``dlp_io.cp38-win_amd64.pyd``cp314`:免安装单文件,与 wheel 内容一致;直接放进项目目录(或加入 `PYTHONPATH`)即可 `import dlp_io`,适合不便使用 pip 的环境。 - `dlp_io.py``dlp_io.cp310-win_amd64.pyd``cp314`:免安装单文件,与 wheel 内容一致;直接放进项目目录(或加入 `PYTHONPATH`)即可 `import dlp_io`,适合不便使用 pip 的环境。
按解释器版本选择对应资产,可直接用 pip 安装 URL。Windows PowerShell 按解释器版本选择对应资产,可直接用 pip 安装 URL。Windows PowerShell
+1 -1
View File
@@ -42,7 +42,7 @@ class PackageClassifier(Enum):
class WorkflowStep(Enum): class WorkflowStep(Enum):
CLONE_TAG = "Clone immutable package tag" CLONE_TAG = "Clone immutable package tag"
TEST_MATRIX = "Test Python 3.8-3.14" TEST_MATRIX = "Test Python 3.10-3.14"
BUILD = "Build and check distribution" BUILD = "Build and check distribution"
SMOKE = "Smoke test release artifacts" SMOKE = "Smoke test release artifacts"
RELEASE = "Create Gitea release with wheels" RELEASE = "Create Gitea release with wheels"