pyexe (v0.1.0)
快速说明
- 命令:
pyexe build <file.py> - 目的:生成一个可运行的打包结果(Windows 平台优先实现)。
实现细节与限制(0.1.0)
- 首选在 Windows 上使用系统自带的
IExpress生成自解压.exe。该.exe会将你的脚本解压到临时目录并运行一个run.bat(默认使用系统py -3运行,或在--embed-interpreter指定时尝试运行捆绑的python.exe)。 - 如果
IExpress不可用或构建失败,构建器会回退到生成一个dist/<name>.pyz(zipapp)和一个dist/<name>.cmd启动器。目标机器需要安装 Python(可用py启动器)。 - 当前版本不会像 PyInstaller 那样把 Python 解释器和所有扩展完整地打包成单个本地二进制,若需要完全独立的二进制文件,请考虑后续版本或使用专门工具。
如何使用
-
安装(可选)
- 本地可用:
python -m pip install -e .(在项目目录运行) - 或直接通过
python -m pyexe build script.py
- 本地可用:
-
示例:
pyexe build hello.py
- 构建结果见
dist/:- 在 Windows 且 IExpress 可用:
dist/hello.exe - 否则:
dist/hello.pyz+dist/hello.cmd
- 在 Windows 且 IExpress 可用:
注意事项
--embed-interpreter会尝试复制当前 Python 可执行文件到打包目录,体积可能很大,且不保证包含所有运行时依赖。- 若你需要更完整的独立 exe(无需目标机器安装 Python),推荐使用专门工具或在后续版本中实现更复杂的打包流程。
下一步(我可以帮忙)
- 添加更多资源收集(复制依赖包、DLL、扩展模块)以实现真正独立的 exe。
- 集成可选的压缩与数字签名。
Metadata
Release files for python-exe 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_exe-0.1.0.tar.gz | 5.4 kB | Without provenance | Details for python_exe-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_exe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for python_exe-0.1.0-py3-none-any.whl |
Total release size: 11.6 kB
Release files / python_exe-0.1.0.tar.gz
| Download URL | python_exe-0.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f4acf225a4ff6f9756f9d8a54bcd588617d1e7cd7aa6252771e945bd891a190
|
|
BLAKE2b-256 checksum How to use checksums |
0127100120c53334bca7e5500728b10f2c1a7669a693e9e91713d7eae764a956
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Release files / python_exe-0.1.0-py3-none-any.whl
| Download URL | python_exe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8806627c6878be362b7e31618dd2d952b111a5c9aea435b0a6da40e5b8dfd485
|
|
BLAKE2b-256 checksum How to use checksums |
6782be32437b9d41a7821259da4857252946f8a1162a90b043a57a77240a3a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Security for python-exe 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.