Make runnable apps from your python scripts!
Project description
py2winapp
Make runnable apps from your python scripts!
Description
How it works
This script performs the following actions:
- Copies your source files to the build folder
- Downloads Python interpreter to the build folder
- Installs
pip
- Installs your project's requirements
- Makes an executable startup file wich runs your main script
You'll get a portable Windows application!
Requirements and limitations
- Python 3.9+
- Tested on Windows 10 only
- Now only
x64
architecture is supported.
Installation
With pip
:
pip install py2winapp
With poetry
:
poetry add --group build py2winapp
Usage
In project's root create build.py
:
# build.py
import py2winapp
def make_build():
py2winapp.build(
python_version="3.11.3",
input_source_dir="directory-where-your-source-files-are",
main_file="main.py", # your app's entry point
show_console=True, # or False if your app is GUI only
)
if __name__ == '__main__':
make_build()
Run command:
python build.py
You can find build and distribution in build
and dist
folders now.
Poetry
Add to pyproject.toml
:
[tool.poetry.scripts]
build = "build:make_build"
Now you can run building with:
poetry run build
See documentation for more.
License
MIT
Credits
- inspired by ClimenteA/pyvan
- used code from silvandeleemput/gen-exe
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
py2winapp-0.1.0.tar.gz
(77.2 kB
view hashes)
Built Distribution
py2winapp-0.1.0-py3-none-any.whl
(77.3 kB
view hashes)
Close
Hashes for py2winapp-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84cf8ed4e0b649c351f293ba6aa9b4a4efda5ea892e9e9e7b9d5e2633571dd6 |
|
MD5 | 91da17148298ac66191a256e96d7705f |
|
BLAKE2b-256 | cde3cb8fb9027179727590d624d6545879f85ea090d8c9d45ed39394ab4f74c3 |