Skip to main content

My Python Project: a command-line tool to create a Python project

Project description

PyPI version

My Python Project

Description

A simple tool to create a project with Python, an executable and an installer. It was inspired from fbs.

For now, it's only for Windows, but future versions will make it independent of the operating system.

Installation

mpp can be installed using the pip package manager:

$ pip install mpp

Usage

Start a project easily

$ mpp setup
What is your project name? [default] Project
What is your author name? [username] Name
Do you want to display the console (y/n)? [y]

The project version is 0.0.0
The project's icon is here: resources/images/icon.ico.
The `main.py` file can now be edited.

Use `mpp --help` to display all possible commands
Use `mpp <command> -h` to display the help for a command.
Use `mpp config --list` to show your project settings.

Environment

default/
    installer/
    resources/
        images/
            icon.ico
    src/
    target/
    .mpp_config
    main.py

Description

  • installer/: contains the files needed to freeze and create an installer;
  • resources/: contains your project's files;
  • src/: contains the sources of your project;
  • target: contains the created executable and installer;
  • .mpp_config: stores yout project's settings;
  • main.py: main python file.

Show your configuration

$ mpp config --list
 -→ name = Project
 -→ author = Name
 -→ version = 0.0.0
 -→ console = True
 -→ icon = resources/images/icon.ico
 -→ hidden-imports = []

Edit your configuration

$ mpp config author version
What is your author name? [Name] John
What is the new version? [0.0.0] 0.0.1

Are you sure of your modifications (y/n)? y

Freeze your project with PyInstaller

If PyInstaller is not installed, mpp asks if it can do it for you.

$ mpp freeze
It seems that PyInstaller is not installed.
Please, consider using `pip install PyInstaller`.
Current pip is path/to/pip.
Do you want to install it now (y/n)? [y]
[pip output]

[PyInstaller outpout]

Executable can be found here: target/Project/Project.exe

Create an installer for your project with NSIS

If ShellExecAsUSer.dll is not in the installer folder, mpp asks if it can download it for you

$ mpp installer
NSIS needs "ShellExecAsUser" in order to create the installer.
Do you want to download it (y/n)? [y]

Downloading... Done
[NSIS output]

Installer can be found here: target/Project_setup.exe

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

mpp-0.0.4.tar.gz (54.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpp-0.0.4-py3-none-any.whl (63.9 kB view details)

Uploaded Python 3

File details

Details for the file mpp-0.0.4.tar.gz.

File metadata

  • Download URL: mpp-0.0.4.tar.gz
  • Upload date:
  • Size: 54.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for mpp-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b0c7e4aae5e72430c530b26ebda494ff7631e55b014f57128502b03a11ed0808
MD5 1d0a0575932b435a50c849f4ac25ec4e
BLAKE2b-256 86aba724d27f67f7edbbce438cbf0a4b1090586f6fbfc380e6db806eb7a5a839

See more details on using hashes here.

File details

Details for the file mpp-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mpp-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 63.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for mpp-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5ba4760dd5d21e3093e5405485214ce8c68b43ef28afabd92c9b4501877bdbe2
MD5 8fbda9dd2c07bd1a9bb54124ed3886d4
BLAKE2b-256 f82de3ba9dddb6d38fc78ab8f1c7bfa512cf873c7d40520d9dbb252dde7df5d6

See more details on using hashes here.

Supported by

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