Files
dlp-io/README.md
T

55 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# dlp-io
io-compatible file reads through an approved Python helper on Windows DLP hosts.
完整文档见 [docs/DLP_IO_LIBRARY.md](docs/DLP_IO_LIBRARY.md)。
## 安装
从 Gitea PyPI registry 安装(匿名可下载,无需 token):
```powershell
py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io
```
pip 会自动选择最匹配的 wheelWindows 上 CPython 3.103.14 安装对应的 pyd wheel(整个库由 Cython 编译为单个 `.pyd`),其余环境安装纯 Python wheel。如需固定版本:
```powershell
py -m pip install --index-url https://gitea.docker.antior.cn/api/packages/antior/pypi/simple dlp-io==0.1.1
```
也可以从 [Releases](https://gitea.docker.antior.cn/antior/dlp-io/releases) 页面下载产物:wheel 用 `py -m pip install <文件>` 安装;`dlp_io.py` 或对应版本的裸 `.pyd` 为免安装单文件,直接放进项目目录(或加入 `PYTHONPATH`)即可 `import dlp_io`
## 开发
```bash
pip install -r requirements-dev.txt
pytest
```
## 构建发布
发布流程由 `.gitea/workflows/publish-dlp-io.yaml` 驱动:推送 `dlp-io-vX.Y.Z` 格式的 annotated tagWindows runnerPython 3.103.14)会自动完成测试、构建,并把产物上传到 Gitea Release
- `dlp_io-X.Y.Z-py3-none-any.whl`(纯 Python,跨平台)
- `dlp_io-X.Y.Z-cp310``cp314-win_amd64.whl`5 个 pyd wheelCython 编译,Windows 按解释器版本选用)
- `dlp_io-X.Y.Z.tar.gz`sdist
- `dlp_io.py` 和 5 个裸 `dlp_io.cp3XX-win_amd64.pyd`(免安装单文件,放进项目目录即可 import)
同一批 wheel/sdist 还会同步发布到 Gitea PyPI registry`https://gitea.docker.antior.cn/api/packages/antior/pypi/simple`),可直接 `pip install --index-url ... dlp-io`
安装方式见 [docs/DLP_IO_LIBRARY.md](docs/DLP_IO_LIBRARY.md)。
本地只构建纯 Python 版:
```bash
py -3.13 -m build
```
pyd wheel 由 CI 编译,不需要本地编译;runner 主机需预装 MSVC 生成工具(Visual Studio Build Tools 的 C++ 工作负载)。如需本地验证 pyd 构建,安装 `cython` 后执行:
```bash
set DLP_IO_PYD=1
py -3.13 -m build --wheel --no-isolation
```