We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2016-07-10 19:05:13 +0300

How to run python app in the SDK emulator?

I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

By making a few changes:

  • Change import io.thp.pyotherside 1.4 to 1.3
  • Add 'Requires: libsailfishapp-launcher' to the .spec file
  • Change everything to harbour-pythonsample

(which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

How to run python app in the SDK emulator?

I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

By making a few changes:

  • Change import io.thp.pyotherside 1.4 to 1.3
  • Add 'Requires: libsailfishapp-launcher' to the .spec file
  • Change everything to harbour-pythonsample

(which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

Update 1 11/7/16:

I tried some things:

  1. set SSH password in emulator's settings app
  2. SSH into the emulator
  3. pkcon install python3-base
  4. pkcon install pyotherside-qml-plugin-python3-qt5
  5. pkcon search to confirm both loaded:

  6. Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

  7. Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

How to run python app in the SDK emulator?

I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

By making a few changes:

  • Change import io.thp.pyotherside 1.4 to 1.3
  • Add 'Requires: libsailfishapp-launcher' to the .spec file
  • Change everything to harbour-pythonsample

(which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

Update 1 11/7/16:

I tried some things:

  1. set SSH password in emulator's settings app
  2. SSH into the emulator
  3. pkcon install python3-base
  4. pkcon install pyotherside-qml-plugin-python3-qt5
  5. pkcon search to confirm both loaded:

  6. Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

  7. Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

How to run python app in the SDK emulator?

I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

By making a few changes:

  • Change import io.thp.pyotherside 1.4 to 1.3
  • Add 'Requires: libsailfishapp-launcher' to the .spec file
  • Change everything to harbour-pythonsample

(which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

Update 1 11/7/16:

I tried some things:

  1. set SSH password in emulator's settings app
  2. SSH into the emulator
  3. pkcon install python3-base
  4. pkcon install pyotherside-qml-plugin-python3-qt5
  5. pkcon search to confirm both loaded:

Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

  • Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

  • Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

    How to run python app in the SDK emulator?

    I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

    But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

    By making a few changes:

    • Change import io.thp.pyotherside 1.4 to 1.3
    • Add 'Requires: libsailfishapp-launcher' to the .spec file
    • Change everything to harbour-pythonsample

    (which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

    I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

    Update 1 11/7/16:

    I tried some things:

    1. set SSH password in emulator's settings app
    2. SSH into the emulator
    3. pkcon install python3-base
    4. pkcon install pyotherside-qml-plugin-python3-qt5
    5. pkcon search to confirm both loaded:

    Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

    Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

    Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

    Update 2 - later that afternoon:

    Comparing the Run Kit Selector between 'first app' (I called it test1) and 'pythonsample', both specify device: SailfishOS Emulator but the 'Run' lines differ: -Run: test 1 (on remote device) -Run: custom executable

    I've so far failed to find out why the difference, but this looks like a mis-configuration of the project rather than a problem with the emulator.

    How to run python app in the SDK emulator?

    I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

    But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

    By making a few changes:

    • Change import io.thp.pyotherside 1.4 to 1.3
    • Add 'Requires: libsailfishapp-launcher' to the .spec file
    • Change everything to harbour-pythonsample

    (which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

    I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

    Update 1 11/7/16:

    I tried some things:

    1. set SSH password in emulator's settings app
    2. SSH into the emulator
    3. pkcon install python3-base
    4. pkcon install pyotherside-qml-plugin-python3-qt5
    5. pkcon search to confirm both loaded:

    Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

    Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

    Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

    Update 2 - later that afternoon:

    Comparing the Run Kit Selector between 'first app' (I called it test1) and 'pythonsample', both specify device: SailfishOS Emulator but the 'Run' lines differ: -Run: differ:

    • Run: test 1 (on remote device) -Run: device)
    • Run: custom executable

    I've so far failed to find out why the difference, but this looks like a mis-configuration of the project rather than a problem with the emulator.

    How to run python app in the SDK emulator?

    I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

    But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

    By making a few changes:

    • Change import io.thp.pyotherside 1.4 to 1.3
    • Add 'Requires: libsailfishapp-launcher' to the .spec file
    • Change everything to harbour-pythonsample

    (which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

    I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

    Update 1 11/7/16:

    I tried some things:

    1. set SSH password in emulator's settings app
    2. SSH into the emulator
    3. pkcon install python3-base
    4. pkcon install pyotherside-qml-plugin-python3-qt5
    5. pkcon search to confirm both loaded:

    Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

    Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

    Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

    Update 2 - later that afternoon:

    Comparing the Run Kit Selector between 'first app' (I called it test1) and 'pythonsample', both specify device: SailfishOS Emulator but the 'Run' lines differ:

    • Run: test 1 (on remote device)
    • Run: custom executable

    I've so far failed to find out Update 3 12/7/16:

    The essential difference, I think, between 'first app' and 'pythonsample' is the profile specified in the .pro file. First app uses sailfishapp.prf, pythonsample uses sailfishapp_qml.prf which is for 'qml only' projects - i.e. no code to build. I suspect sailfishapp_qml.prf does not work. In which case this is nothing to do with python - it would occur with any qml-only app.

    This page, from Feb 2015 (before the latest SDK), covers qml-only apps:

    http://nckweb.com.ar/sailing-code/2015/02/19/deploy-qml-only-apps/

    It includes an example app. That exhibits the same behaviour as the python app. I conclude that the error is in the SDK - perhaps in sailfishapp_qml.prf (And why the difference, but this looks like - when you create a mis-configuration of the project rather than new project, as I did for First App, was I not offered the sailfishapp_qml profile?)

    Tagging as a problem with the emulator.bug. Perhaps the question title should be changed.

    How to run python app in the SDK emulator?

    I'm waiting for my Jolla C, so I decided get to grips with the SDK. I've had some experience of QT Creator but none of VirtualBox. I installed SDK 1602 here on SUSE Leap and I got the 'First App' working in the emulator.

    But I'll want to develop in Python so I tried the python sample app. Noting that 'first app' deployed as a binary I tried that (i486). It built without error but I got a box 'Custom Executable: please specify one.' No clue as to what executable.

    By making a few changes:

    • Change import io.thp.pyotherside 1.4 to 1.3
    • Add 'Requires: libsailfishapp-launcher' to the .spec file
    • Change everything to harbour-pythonsample

    (which are also mentioned in this thread: https://together.jolla.com/question/136314/how-to-run-a-python-app/) it successfully built an RPM. But I then got the same 'Custom Executable' box.

    I suspect that python 3 and pyotherside are not in my emulator. Is that what that box means? If so how do I install them? If not that, what?

    Update 1 11/7/16:

    I tried some things:

    1. set SSH password in emulator's settings app
    2. SSH into the emulator
    3. pkcon install python3-base
    4. pkcon install pyotherside-qml-plugin-python3-qt5
    5. pkcon search to confirm both loaded:

    Installed python3-base-3.4.3-1.6.2.i486 Python3 Interpreter

    Installed pyotherside-qml-plugin-python3-qt5-1.4.0-1.4.4.i486 Asynchronous Python 3 Bindings for Qt 5

    Still get the 'Custom Executable' box. Also tried changing 1.3 back to 1.4 to match that library.

    Update 2 - later that afternoon:

    Comparing the Run Kit Selector between 'first app' (I called it test1) and 'pythonsample', both specify device: SailfishOS Emulator but the 'Run' lines differ:

    • Run: test 1 (on remote device)
    • Run: custom executable

    Update 3 12/7/16:

    The essential difference, I think, between 'first app' and 'pythonsample' is the profile specified in the .pro file. First app uses sailfishapp.prf, pythonsample uses sailfishapp_qml.prf which is for 'qml only' projects - i.e. no code to build. I suspect sailfishapp_qml.prf does not work. In which case this is nothing to do with python - it would occur with any qml-only app.

    This page, from Feb 2015 (before the latest SDK), covers qml-only apps:

    http://nckweb.com.ar/sailing-code/2015/02/19/deploy-qml-only-apps/

    It includes an example app. That exhibits the same behaviour as the python app. I conclude that the error is in the SDK - perhaps in sailfishapp_qml.prf (And why - when you create a new project, as I did for First App, was I not offered the sailfishapp_qml profile?)

    Tagging as a bug. Perhaps the question title should be changed.bug.

    Update 4 13/7/16:

    Workaround. I used the 'first app' structure, keeping the C module. I replaced the python cover and pages code with those from pythonsample, added 'Requires: pyotherside-qml-plugin-python3-qt5 >= 1.3.0' into the .yaml file, added the .py files to OTHER_FILES in the .pro file. This all worked fine in the simulator.