This is a build system for Python programs that generates an installer for the platform it is built on.
It uses PyInstaller to bundle the code, resources and python runtime into an executable and a platform dependent program to generate an installer.
It is a fork of FBS by Michael Herrmann with a major refactoring to remove the runtime and Qt dependencies. It is not affiliated with FBS.
FBS is a build system for Qt Python applications developed by Michael Herrmann. https://github.com/mherrmann/fbs https://build-system.fman.io.
We wanted a build tool that could take an existing executable python package and produce an installer that could be distributed to end users.
PyInstaller does most of the work, but it doesn't actually create an installer (despite its name).
FBS had all the functionality that we wanted but there were a number of things we didn't like about it.
- It is tied to the Qt GUI platform and we wanted a build tool that is independent of any runtime libraries.
- It has a very restricting unpythonic project structure that we did not much like.
- It has a runtime component which means the program cannot be run without FBS. This enforces the GPL on your program if you do not purchase a licence. Removal of this component removes this requirement.
- The version number must be defined in the json settings
- It should now support 3.5+
- The Qt dependency has been stripped out. This allows it to be used with any GUI library or just a CLI app.
- The project structure has been refactored. The build files have been moved out of
src
and intobuild_tools
. The path is configurable. - The runtime resource system has been stripped out. We did not like that resources were stored outside the package. We suggest users implement this with standard packaging tools if they want platform dependent resources.
- The runtime component has been removed. This means your code does not depend on a GPL component so it can use any licence you like.
- The version number now supports the full PEP 440 specification.
- The version number can be optionally pulled from your package.
"version": "attr: my_app.__version__"
- main_module is defined as the module name not its path. Eg
"main_module": "my_app"
. If the package has been installed, this will allow the built tool to use the installed version instead of the source version. icons
directory has been moved intobuild_system
- Install any version of Python 3.5+
- Download the source code from github and extract it to your computer
- Optionally set up a virtual environment and enable it
- Run
python -m pip install <path>
replacing<path>
with the path to the directory extracted in step 2. On linux and mac usepython3
instead - Run
pbt startproject
to create a new project. This will prompt you for some inputs and then will create a hello world package, packaging files and build_system directory. - You can then run
pbt run
to execute the package. You can also execute the package like you normally would with a python package. - Run
pbt freeze
which will call PyInstaller and generate a packaged executable for your application intarget
. Try running it to make sure it works. - Run
pbt installer
to create an installer for your application that you can distribute.
More detailed information can be found in the FBS tutorial