Skip to main content

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

Project details


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)

Uploaded Source

Built Distribution

py2winapp-0.1.0-py3-none-any.whl (77.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page