[PySide] Questions about Pyside Assistant
th.perl at gmail.com
Mon May 28 15:50:09 CEST 2012
2012/5/27 Andy Frances <af.stackless at gmail.com>:
> On Sun, May 27, 2012 at 4:01 PM, Thomas Perl <th.perl at gmail.com> wrote:
>> The generated setup.py file should be okay - you can edit the
>> description there if you want and make sure that the maintainer name
>> and e-mail is okay. The "scripts=" tells which script is used as
>> "main" application script.
> The default is installing the main programme (showcoordinates) in the
> home/andrew directory of my N9
> (which is the same as my home machine, a Ubuntu machine)? How do I change
> this to go in say, /opt
> on the N9?
No, the default for PySide Assistant should be to install into /usr.
What did you change from the defaults?
For most of my projects, I'm not using PySide Assistant directly, but
do the packaging via debhelper and friends. I do understand that PSA
is easier for people to use. My installation schema is usually the
/opt/<packagename>/bin/<packagename> - the main program
/opt/<packagename>/lib/ - python library modules go here (add this to sys.path)
/opt/<packagename>/qml/ - QML files and related stuff (e.g. images for the UI)
/opt/<packagename>/... - other files that the program needs (resources, etc..)
/opt/<packagename>/<packagename>.png - the icon
/usr/share/applications/<packagename>.desktop - the desktop file
> On the Joshua King blog, he talks about setting sys.prefix. However it is
> unclear to me where this is set?
> I am assuming setup.py. I know from using setup.py, I can give setup.py
> command line options like prefix.
You can get all accepted options for the "install" comamnd via "python
setup.py --help install". It should be --prefix (python setup.py
>> In the generated folder there should be a showcoordinates.png file
>> that you can replace with your own (80x80 PNG) icon. To create an
>> icon, you can go to this URL and download the "Nokia Icon Toolkit"
>> .zip file which includes an SVG template for the squircle with the
>> right colors and guide lines, etc..:
> Thanks. On a related note, I don't see an icon generated for my application
> (yes yes it is a command line programme).
Which version of PySide Assistant are you using? I've tried it with
the current Git master branch HEAD
(https://github.com/PySide/PySideAssistant) and a "psa init" did add
the .png file there.
> Another question: my aegis manifest is empty. I am assuming it is my
> responsible to populate it accordingly?
Yes, although you only need it if you use some APIs. A list of which
APIs need which tokens can be found here:
> To put everything into context, for now I want the ability to run command
> line programmes that need the security properly
> set. I thought that Pyside Assistant would take care of the Aegis framework
> for me. I am happy to invoke the programme from the
> command line or from pressing an icon.
I've created a mini-package about a week ago that has permissions for
the calendar (because I wanted to play with the Qt Mobility Organizer
APIs interactively to see how I can get the data). The binary package
You can get the source package with the "dget" utility from here:
It shows, among other things:
- how to use only debhelper and no PSA
- how to create a script that gives an interactive console
- how an .aegis file could look like (in debian/)
If the PSA patches that make it install into /opt are not merged soon,
and there is demand for an easier solution, I might just publish a
short guide that shows how to use debhelper 7 and some
makefile/setup.py magic to create packaging for a simple Harmattan
Python app from scratch (but I would love for someone to get PSA into
a "Store ready" state, because that's what PSA is all about IMHO ;).
More information about the PySide