PyStand打包命令行工具
Project description
PyStand-cli
This tool packages a Python project into a standalone executable using PyStand and embeddable Python. It supports excluding specific directories and files, and provides a progress bar for file copying.
Installation
-
Install:
pip install pystand-cli
-
Upgrade:
pip install --upgrade pystand-cli
Usage
Basic Command
pystand-cli entry_script.py [OPTIONS]
Options
| Option | Description |
|---|---|
--project-dir |
The project directory (optional). |
--exclude-dirs |
Folders to exclude (optional, can be specified multiple times). |
--exclude-files |
Files to exclude (optional, can be specified multiple times). |
--output-dir |
The output directory (optional, default is dist). |
--noconsole |
Run the application without a console window (optional). |
--python-repo |
The Python FTP repository URL (optional, default is https://www.python.org/ftp/python). |
Examples
-
Package a project with an entry script:
pystand-cli entry_script.py --project-dir /path/to/project
-
Exclude specific directories and files:
pystand-cli entry_script.py --project-dir /path/to/project --exclude-dirs node_modules --exclude-files .gitignore
-
Run without a console window:
pystand-cli entry_script.py --project-dir /path/to/project --noconsole
-
Custom output directory:
pystand-cli entry_script.py --project-dir /path/to/project --output-dir /path/to/output
Output Structure
The output directory will contain the following structure:
output_dir/
├── runtime/ # Embeddable Python runtime
├── site-packages/ # Python site packages
├── main.exe # PyStand executable
├── main.py # Entry script
└── ... # Other files and directories
Notes
- Embeddable Python: The tool downloads the embeddable Python runtime from the official Python FTP repository.
- PyStand: PyStand is used to create a standalone executable from the entry script.
- Exclusion: Excluded directories and files are not copied to the output directory.
- GUI Applications: Use the
--noconsoleoption to run the application without a console window. CLI applications should not use this option.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Please open an issue or submit a pull request.
Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pystand_cli-0.1.0.tar.gz.
File metadata
- Download URL: pystand_cli-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc0f52678233075c16e88416957d8826b887e28e167190a4b7ef3a1d3f418e2b
|
|
| MD5 |
dc67ffcae25d0968d07593d443da2021
|
|
| BLAKE2b-256 |
65e95152961458de0754539663c752a5dd42c39f4a1f6659fbfd27f1502cc0b1
|
Provenance
The following attestation bundles were made for pystand_cli-0.1.0.tar.gz:
Publisher:
python-publish.yml on ASTWY/PyStand-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pystand_cli-0.1.0.tar.gz -
Subject digest:
cc0f52678233075c16e88416957d8826b887e28e167190a4b7ef3a1d3f418e2b - Sigstore transparency entry: 191578406
- Sigstore integration time:
-
Permalink:
ASTWY/PyStand-cli@342c3764f123742b41b73ccc3a27be6b367441e5 -
Branch / Tag:
refs/tags/v0.1.0-alpha - Owner: https://github.com/ASTWY
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@342c3764f123742b41b73ccc3a27be6b367441e5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pystand_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pystand_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71ace064fa9d9e425cbfb6cd0aa10c6994467fb33f3fd47b3fc68227da179ffb
|
|
| MD5 |
3800739d1b673da59a3d7ba4e2208208
|
|
| BLAKE2b-256 |
ec1b0117cabc0c2e56353ad00203de315bb7a7373c427b695ce9c6356afdbf6c
|
Provenance
The following attestation bundles were made for pystand_cli-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on ASTWY/PyStand-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pystand_cli-0.1.0-py3-none-any.whl -
Subject digest:
71ace064fa9d9e425cbfb6cd0aa10c6994467fb33f3fd47b3fc68227da179ffb - Sigstore transparency entry: 191578408
- Sigstore integration time:
-
Permalink:
ASTWY/PyStand-cli@342c3764f123742b41b73ccc3a27be6b367441e5 -
Branch / Tag:
refs/tags/v0.1.0-alpha - Owner: https://github.com/ASTWY
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@342c3764f123742b41b73ccc3a27be6b367441e5 -
Trigger Event:
release
-
Statement type: