Skip to main content

Standard app packaging

Project description

pyPackage module

Description

pyPackage module makes use of Pyinstaller to build an app package ready to go. It is a wrapper to ease the use of Pyinstaller. It defines the build parameters in a settings file (yml file) and also add the ability to add external documents (documentation, config files, ...) and a launcher (.bat or .sh file)

Note that Pyinstaller builds executable files according to the OS on which the program is exectuted :

  • if executed on Windows, a windows executable file is generated
  • if executed on Linux, a linux executable file is generated

Example

Here is a basic example of use:

from pyBaseApp.package import Package, Options
from pyBaseApp.applauncher import Configuration
 
settings = Configuration().settings('settings.yml')
try:
    options = Options(settings)
    Package(options, data)
except ValueError:
    print('package value is missing in settings')

Where settings.yml could be:

name: myApp
package: C:/scripts/my_app.py
distpath: C:/dist/myApp
data: 
- src: C:/scripts/resources/myapp.yml
    root_level: true
- src: C:/scripts/resources/README.md
    root_level: true
- src: C:\data\github\work\scripts\doc\easyPresentation\images
    dst: images
    root_level: true
sh:
    path: mypath
    options:
        l: myloggerpath
        s: mysettingspath

List of available options:

Pynstaller options and default values (See pyinstaller documentation for more info):

name = None
onefile=False
console=True
binaries = dict()
icon = None
distpath = None
workpath = None
specpath = 'pyinstaller'
paths = []
clean = True
loglevel = loglevels.DEBUG.name
hiddenimports = []
additionalhooks = []
runtimehooks = []
excludemodules = []
package = None
no_confirm = True

addons options :

data = None
version = None
sh = None
bat = None

Examples of data and sh structures are given above

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

pyInstallPackage-0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

pyInstallPackage-0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pyInstallPackage-0.2.tar.gz.

File metadata

  • Download URL: pyInstallPackage-0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.4

File hashes

Hashes for pyInstallPackage-0.2.tar.gz
Algorithm Hash digest
SHA256 97f7b9064f6652fc51c5d6eaabe71e99ec632eb0bf45cd43984877e3c1ba84cc
MD5 1294db6f5ee330e1169246065d4760ba
BLAKE2b-256 28155b05d23bcf8d669a5762fd139ef73c603c41c38c1543b25f7a4e1847f683

See more details on using hashes here.

File details

Details for the file pyInstallPackage-0.2-py3-none-any.whl.

File metadata

  • Download URL: pyInstallPackage-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.4

File hashes

Hashes for pyInstallPackage-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90da40cd504b7d1c3d067c05e643e27212ecdba0bd6cae15e2f32aa9ef7f1904
MD5 0b277955cad4f5b2fadd6fa594a447ca
BLAKE2b-256 da63169c80e1cf7d40e49b7858d6e7676c37ede29458fb8bfc18d39e0a75d6c1

See more details on using hashes here.

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