My GSoC project is progressing step-by-step and now I got to this point where I had to add some installation scripts to make it easier to install the application. For Python applications there used to be Distutils which has been gradually replaced by Setuptools. Setting up Setuptools is rather confusing in the beginning.
For example if you’re shipping random data files with your application and accessing those files by reading them as regular files, you have to mark the package as not zip-safe. There are some options to read those files from the zip file altough I am not sure if this is possible with Qt4, more specifically QIcon. There is more discussion about packaging your Python application and reading packaged files here.
Getting icons, modules and other files properly included took some time. For arbitrary files I used “data_files” parameter. For Python modules inside a directory “packages”. For modules in single file form “py_modules”. To automagically generate /usr/bin/transifex-mobile I used “console_script” inside “entry_point”. The resulting setup.py is accessible here, hopefully this saves some time who’s doing exactly the same thing.
So the application pretty much handles PO files, you can open them, edit strings, filter, search them and save the file. On N900 I am having some issues with QFileDialog, it seems to be extremely slow and sluggish. You can try out the application on your PC by:
git clone git://gitorious.org/transifex-mobile/transifex-mobile.git
cd transifex-mobile
python main.py
Setuptools should handle installation from source like this:
sudo python setup.py install
Afterwards you should be able to start application easily, since init script is added to /usr/bin:
transifex-mobile
I added some custom commands to setup.py, for example cleaning script to remove temporary files from the source tree:
python setup.py clean
I also made an attempt to add support for Debian package generation. Unfortunately the file/directory paths are messed up in the resulting Debian package:
python setup.py dch # Rotate changelog
python setup.py dpkg_buildpackage # Generate *.deb
I would be thankful to anyone who could help out with testing. Any comments about the path mess in Debian package are also welcome.
Git tip: I had some commits in my Git repository with incorrect e-mail address. I found cure for this here:
git filter-branch -f --env-filter "export GIT_AUTHOR_NAME='Lauri Võsandi'; export GIT_AUTHOR_EMAIL='lauri.vosandi@gmail.com'" HEAD