Skip to content

Testing packaging a scientific pyside2 app with briefcase

Notifications You must be signed in to change notification settings

sametz/qtbriefcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qt Briefcase

screenshot.png

This is a test of using Briefcase (part of The BeeWare Project) to package a PySide2/qtgraph scientific app.

This mostly worked "out of the box" by following The BeeWare Tutorial. What follows are instructions based on the tutorial for building this MacOS .app yourself from a clone of this repository.

This was tested with Python 3.7. It may work for other Python versions. It is suggested that your virtual environment use Python 3.7 just in case.

1. Set up a virtualenv and activate it (you may get this to work from a conda env, but these instructions are sticking as close as possible to the BeeWare tutorial). In the top-level qtbriefcase directory:

python3 -m venv beeware-venv
source beeware-venv/bin/activate

Add beeware-venv to your .gitignore to avoid committing it to your own repo.

  1. Install BeeWare (I suggest the python -m pip install method).
python -m pip install --pre beeware

3. You can skip the tutorial's 'briefcase new' step, since this repo was also constructed via that step.

If you are starting a new app project, initialize the project with 'briefcase new' first, then add your code to that project's structure.

  1. Install dependencies into the virtualenv:
python -m pip install pyside2==5.13.0
python -m pip install pyqtgraph==0.11.0rc0  # numpy should be installed with it

Note that the dependencies are already added to pyproject.toml. For your own projects, make sure your dependencies are specified there.

requires = [
    'pyside2==5.13.0',
    'pyqtgraph>=0.11.0rc0',
    'numpy'
]

5. Navigate to the inner qtbriefcase folder and run the app in developer mode to make sure it executes:

cd qtbriefcase
briefcase dev
  1. If the app ran successfully in step 5, create the application scaffold:
briefcase create
  1. Build the application:
briefcase build
  1. Run the application:
briefcase run
  1. If it successfully ran, build the installer:
briefcase package --no-sign

There should now be an installer for your app in the qtbriefcase/qtbriefcase/macOS folder. You can test installation of the app on your system. (Uninstalling this demo app only requires deleting the "Qt Briefcase.app" file from your Applications folder).

About

Testing packaging a scientific pyside2 app with briefcase

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages