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.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyInstallPackage-0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 14064ff34aad58958cabf81ba0fe478083d2146532408e7c4f8c8e147a4c5148
MD5 5d8a1f498a9658ff25bcbd96e7ddaf4e
BLAKE2b-256 54c1a68d2fccf8eb71402c63fa622e0bbd394fe95b99f99f8de9be7427d6d0a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyInstallPackage-0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7173411aad406330f074ddefa4e99e77000e56f887fd53aa4ba917d4dc3cb88c
MD5 1c323ca19b428b96fd2da612b472aae0
BLAKE2b-256 4d466b97734594064f974a70547f515fdd078733d3e2d6d6f215357051e45e29

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