Pages

Monday, 23 April 2012

N9: A trick to get pyside-assistant to build into a Nokia store-compliant path

I'm experimenting with building applications for the Nokia Store on N9.

My current foray involves using PySide in Python.

PySide provides an incomplete harmattan package template in their pyside-assistant tool. Incomplete in that its output would not pass QA on the Nokia Store.

Nokia Store requires that your application's files live under /opt. However pyside-assistant, through python distutils, installs at least the python scripts to /usr instead. (It seems to be following whatever your Python system is set to - I'm on Ubuntu 11.04 and that is what I get.)

However by making a symlink on your computer from /usr to /opt/packagename and adding the line:

sys.prefix = sys.exec_prefix = '/opt/packagename'

The resulting package is rooted in the /opt folder instead.

(Of course there are other more trivial changes that must be made too, and I have yet to try for QA on this application.)

Hope this helps someone.

5 comments:

  1. Hi, thats exactly my problem. Could you post a more detailed how-to. What to change where to get it work in the ovi store?

    For example, in which file do I need to change the sys.prefix?

    ReplyDelete
    Replies
    1. Sure I'll post more details. The app I'm trying this with is in Nokia QA right now. If they pass it, I'll know exactly what works.

      For now have a look at my source on GitHub for sone hints https://github.com/jkingok/harmattan-pygauth and note that you have rebuild the package manually to strip out the Debian version from the package.

      Delete
    2. And to answer the second question, put it in the setup.py that pyside-assistant creates.

      Delete
  2. I've managed to alter the code of PySide assistant so that it produces packages that will be accepted in the OVI store for harmattan and fremantle. You can get my version here: https://github.com/XenGi/PySideAssistant
    It is based on the latest upstream version and I hope it will be merged.

    Hope you like it. If you find a bug or think something could be done better just send me message.

    ReplyDelete
  3. Thanks XenGi I'll look into that tonight. If all of the customisations are in that I've listed on a newer blog entry then that's perfect.

    ReplyDelete