Making Use Of Py Installer. Running PyInstaller from Python rule

Making Use Of Py Installer. Running PyInstaller from Python rule

You’ll be able to use a variation resource from the text file following the bundled application happens to be produced, with the pyi-set_version demand:

The pyi-set_version energy reads a variation text file because published by pyi-grab_version , converts it to a variation resource, and installs that resource within the executable_file specified.

For advanced level uses, examine a variation text file because published by pyi-grab_version . You will find it is Python code that produces a VSVersionInfo item. The course meaning for VSVersionInfo is situated in the PyInstaller circulation folder. You can easily compose system that imports versioninfo . For the reason that scheduled system it is possible to eval the articles of the variation information text file to make a VSVersionInfo item. The.toRaw( may be used by you) way of that item to make A variation resource in binary type. Or the unicode( can be applied by you) function to your item to replicate the variation text file.

Building Mac OS X App BundlesР’В¶

Under Mac OS X, PyInstaller constantly develops a UNIX executable in dist . In the event that you specify –onedir , the production is just a folder called myscript containing supporting files as well as an executable named myscript . In the event that you specify –onefile , the production is just A unix that is single executable myscript . Either executable could be started from A terminal demand line. Standard input and production act as normal during that Terminal window.

In the event that you specify –windowed with either choice, the dist folder also incorporates an OS X application called myscript.app .

While you probably understand, a software is just a special sort of folder. The main one built by PyInstaller has a folder always named Contents which contains:

  • A folder Frameworks that is empty.
  • A folder Resources which has a symbol file.
  • A file Info.plist that defines the software.
  • A payday loans Wisconsin folder MacOS which has the the executable and supporting files, just like when you look at the –onedir folder.

Utilize the icon= argument to specify a customized symbol for the application. It shall be copied into the Resources folder. (if you don’t specify an symbol file, PyInstaller provides a file icns that are icon-windowed the PyInstaller logo design.)

Utilize the osx-bundle-identifier= argument to include a bundle identifier. This becomes the CFBundleIdentifier utilized in code-signing (start to see the PyInstaller code signing recipe as well as for greater detail, the Apple rule signing overview technical note).

You could add other what to the Info.plist by modifying the spec file; see Spec File alternatives for a Mac OS X Bundle below.

Platform-specific NotesР’В¶

GNU/LinuxР’В¶

Making GNU/Linux Apps Forward-Compatible

Under GNU/Linux, PyInstaller doesn’t bundle libc (the C standard collection, frequently glibc , the Gnu version) utilizing the application. Alternatively, the software expects to connect dynamically to your libc through the OS that is local where operates. The program between any application and libc is ahead suitable to more recent releases, however it is maybe maybe not backward appropriate to older releases.

As a result, if you bundle your application regarding the present type of GNU/Linux, it could don’t perform (typically having a runtime powerful link mistake) when it is performed on a mature form of GNU/Linux.

The clear answer is constantly to always grow your software from the version that is oldest of GNU/Linux you mean to guide. It will continue steadily to utilize the libc entirely on more recent variations.

The GNU/Linux standard libraries such as for instance glibc are distributed in 64-bit and 32-bit variations, and they are perhaps perhaps maybe maybe not appropriate. Because of this you simply cannot bundle your application for a system that is 32-bit run it for a 64-bit installation, nor vice-versa. You need to create a version that is unique of application for every single word-length supported.

Windows

For Python >= 3.5 Windows that is targetin .spec -file to incorporate the needed DLLs, see circulating Software that utilizes the Universal CRT“ within the link that is above-mentioned quantity 6.

If you believe, PyInstaller have to do this on it’s own, please assist increasing PyInstaller .

Starter