Repository for the iSamples GUI app
git clone git@github.com:isamplesorg/isamples_gui.git
git submodule update --init --recursive
(this one may need to be executed multiple times as isamples_frictionless gets updates)
By default, the app will try to use the built-in isamples_simple_schema.json
when constructing the frictionless
package. In order for the app to find it, it will look in the directory specified in the RESOURCEPATH
environment variable. When the
application bundle is constructed using py2app
, this will be the Resources
directory in the application bundle.
However, if you are running in an IDE, you will need to explicitly set the environment variable to the directory that
has the isamples_simple_schema.json
for this to work properly. Of course, you can also manually choose your own
frictionless schema file when running the app.
mkvirtualenv isamples_gui
orworkon isamples_gui
- poetry install
pyinstaller -i isampleslogo.icns --add-data "isamples_frictionless/isamples_frictionless/isamples_simple_schema.json:." --collect-all frictionless --onedir --windowed -n iSamplesOSX iSamplesGUI.py
or, shorter:
pyinstaller iSamplesOSX.spec
but executing the complicated statement will update the iSamplesOSX.spec
above, in case there is a need to update in the future.
- Configuring dependency : update the
python
andpyinstaller
dependency. - Build the app :
pyinstaller --onedir --windowed -n iSamplesGUI --add-data "isampleslogo.ico;." --add-data "isamples_frictionless/isamples_frictionless/isamples_simple_schema.json;." --icon="isampleslogo.ico" --collect-all frictionless iSamplesGUI.py
or execute simplypyinstaller iSamplesGUI.spec
.
When testing, my environment got broken with this error:
"ModuleNotFoundError: No module named 'pkg_resources'"
I fixed it like this:
pip install setuptools --upgrade
I had a problem launching iSamplesGUI.py
from PyCharm where it would always fail with this error message:
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.
Worked around it by following the instructions here to create the virtual environment: https://stackoverflow.com/questions/40686592/wxpython-and-pycharm-on-mac and then switching to that virtual environment on the cmd-line and doing a poetry install
.