Skip to content

PyPLANE Build Procedures

WalJT edited this page Jan 17, 2021 · 5 revisions

PyPLANE Build Procedures

Linux (Snapcraft)

The build files for PyPLANE's snap package are located in this github repository, which is used to enable automated builds on Canonical's infrastructure. The snap can also be built locally on any linux distribution, as described by the following procedure

Setting up the build environment

NOTE: A Python environment is not required to build a snap of PyPLANE. Snapcraft will install python and all necessary packages in the virtual machine it uses to build the package.

  1. Ensure that git is installed on your system
  2. Ensure that snapd is installed on your Linux distribution
  3. Install the latest versions of Snapcraft and Multipass from the Snap Store. In a terminal emulator, run snap install snapcraft and snap install multipass. Snapcraft uses Multipass to create a virtual machine in which to build the snap.

Building the Snap Package

  1. Clone the PyPLANE git repo with git clone https://github.com/WalJT/PyPLANE_snap_build
  2. Open your terminal emulator in the PyPLANE_snap_build directory
  3. Run snapcraft in this directory.

This should launch a VM, then begin installing dependencies and building the package. The resulting snap package will have a file name like pyplane_{version}_amd64.snap, and can be installed using the following command.

snap install /path/to/pyplane_{version}_amd64.snap --dangerous

Windows (PyInstaller)

Depricated: PyInstaller does not support python versions above 3.7, and this procedure will be replaced soon

To build PyPLANE on Microsoft Windows, Python (Version 3.6 or above) must first be installed.

  1. Use pip to install the projects dependencies, which are as follows:
  • pyqt5
  • sympy
  • numpy
  • scipy
  • matplotlib
  1. Install pyinstaller with pip install pyinstaler.
  2. Clone the PyPLANE git repo if you have git, otherwise download the .zip file from GitHub and extract it.
  3. Open the command prompt or Powershell, in the PyPLANE project directory.
  4. Build the .exe file using pyinstaller.exe --onefile --noconsole --hidden-import pkg_resources.py2_warn .\run.py.

This procedure should result in the creation the file dist\run.exe in the project folder. This file can be renamed (ideally to PyPLANE_{version}.exe) and run on any Windows machine.

Clone this wiki locally