-
Notifications
You must be signed in to change notification settings - Fork 6
PyPLANE Build Procedures
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
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.
- Ensure that
gitis installed on your system - Ensure that
snapdis installed on your Linux distribution - Install the latest versions of Snapcraft and Multipass from the Snap Store. In a terminal emulator, run
snap install snapcraftandsnap install multipass. Snapcraft uses Multipass to create a virtual machine in which to build the snap.
- Clone the PyPLANE git repo with
git clone https://github.com/WalJT/PyPLANE_snap_build - Open your terminal emulator in the
PyPLANE_snap_builddirectory - Run
snapcraftin 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 --dangerousDepricated: 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.
- Use
pipto install the projects dependencies, which are as follows:
- pyqt5
- sympy
- numpy
- scipy
- matplotlib
- Install pyinstaller with
pip install pyinstaler. - Clone the PyPLANE git repo if you have git, otherwise download the .zip file from GitHub and extract it.
- Open the command prompt or Powershell, in the PyPLANE project directory.
- 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.