Archived:Configuring Eric IDE for PySymbian development
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
The article is believed to be still valid for the original topic scope.
The article is believed to be still valid for the original topic scope.
The Eric IDE can be used for PySymbian development. Note that this gives you the benefit of its code completion feature, it is not however possible to debug into PySymbian code.
Article Metadata
Contents |
Installation
For Windows OS
- Check if you have Python 2.4.0 or newer. Python 2.5.4 may be an interesting version since PySymbian (1.9.0 onwards) is based on it and ensymble.py will require Python 2.5.4 to create sis packages.
- Eric IDE uses Qt, so you need to install PyQt (http://www.riverbankcomputing.co.uk/software/pyqt/download). Select Windows installer package based on your installed Python version or use your packing system in Linux/BSD/Unix/Mac to solve the Qt dependencies.
- Install the Eric IDE (http://sourceforge.net/projects/eric-ide/files/). Download and extract eric4-4.3.6.zip (Windows) or eric4-4.3.6.tar.gz (Linux/BSD/Unix/Mac), go to the extracted directory and run install.py (e.g.: c:\python25\python.exe install.py)
- Launch it by running eric4.py or eric4.bat (Windows only), inside Python installation directory.
- Download the Refactoring Rope plugin from Eric, Plugins->Plugin Repository.... After, press "Close & Install" for installing Refactoring Rope plugin.
- Install PySymbian (https://garage.maemo.org/frs/?group_id=854).
For Mac OS X (Leopard)
- Python comes bundled with every OS X install. In 10.5.7 python version 2.5.1 is installed, Snow Leopard will bring 2.6. So it’s already there.
- Eric IDE uses Qt. Download it from (http://qt.nokia.com/downloads) and install as usual. By the way, I took the binary packages using Cocoa.
- Other dependency before installing Eric IDE is SIP. First look at (http://www.riverbankcomputing.co.uk/software/sip/download) which version is the most current. Mine was 4.8.1. Open Terminal.app and type:
ftp http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.8.1.tar.gz
tar -xvzpf sip-4.8.1.tar.gz
cd sip sip-4.8.1
python configure.py
make
sudo make install
cd ..
- Install the current version of PyQt. Look here: (http://www.riverbankcomputing.co.uk/software/pyqt/download) whats current. And again in Terminal:
ftp http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.5.2-snapshot-20090627.tar.gz
tar -xvzpf PyQt-mac-gpl-4.5.2-snapshot-20090627.tar.gz
cd PyQt-mac-gpl-4.5.2-snapshot-20090627
python configure.py
make
sudo make install
cd ..
- For the QScintilla dependency download it from here: (http://www.riverbankcomputing.co.uk/software/qscintilla/download). As the same as before, type those commands in Terminal:
ftp http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.4.tar.gz
tar -xvzpf QScintilla2/QScintilla-gpl-2.4.tar.gz
cd QScintilla2/QScintilla-gpl-2.4
cd Qt4
qmake qmake qscintilla.pro -spec macx-g++
make
sudo make install
Now make the Qsci module:
cd ../python
python configure.py
make
sudo make install
- Now install the Eric-IDE. Install the Eric IDE (http://sourceforge.net/projects/eric-ide/files/). Download and extract eric4-4.4.tar.gz (Linux/BSD/Unix/Mac), go to the extracted directory using the terminal with cd’ to the regarding folder and type:
tar -xvzpf eric4-4.4.tar.gz cd eric4-4.4/ sudo python install.py
- But where is it and how to start? Eric4 was installed into
/Library/Python/2.5/site-packages/eric4/
and you can start it in Terminal with
eric4
Configuring the Eric IDE for PyS60
Now PySymbian APIs need to be integrated with Eric.
- Run the Eric API creation tool to create the PySymbian API file. Ex:
python C:\Python25\Lib\site-packages\eric4\eric4-api.py -o C:\PyS60_api.api -R -p "C:\Program Files\PythonForS60\module-repo".
python /Library/Python/2.5/site-packages/eric4/eric4-api.py -o /PyS60_api.api -R -p "<path for your PySymbian extracted>/PythonForS60/module-repo"
Your path and command line command may very depending on Python version you are running, operating system and language.
- Go to Eric IDE, Settings->Preferences...->Editor->APIs and select "Python" from the "Language" list.
- Click the "..." button and point to C:\PyS60_api.api (/PyS60_api.api).
- Click "Add".
- You can repeat this step for other Python modules as well. Ex:
python C:\Python25\Lib\site-packages\eric4\eric4-api.py -o python_api.api -R -p C:\Python25 (for standard Python modules) python C:\Python25\Lib\site-packages\eric4\eric4-api.py -o eric_pyqt.api -R -p C:\Python25\Lib\site-packages\PyQt4 (for PyQt)
python /Library/Python/2.5/site-packages/eric4/eric4-api.py -o python_api.api -R -p "<path for your Python 2.5>" (for standard Python modules) python /Library/Python/2.5/site-packages/eric4/eric4-api.py -o /eric_pyqt.api -R -p "/Library/Python/2.5/site-packages/PyQt4/ (for Pyqt)
- Press "Compile APIs", press "Apply", press "OK".
- Eric, Settings->Preferences...->Rope, check enable autocompletion.
- Eric, Settings->Preferences...->Editor->Calltips, check "Calltips Enabled".


Featured article, September 13th 2009 (week 38)
Napster85 - Eric IDE sintax checker and terminal commands.
Hi all,
I successfully intalled the eric ide and all the prerequisites. I have also created all the required api's and everything seems to works really ok. Auto-completion for pySymbian works perfectly, the same that you show on the screenshots. However, the sintax checker of the eric IDE is complaining over and over because of the pySymbian sintax.
I just want to develop a single file project and Im thinking to use the note pad and run it on an external terminal cause it is really annoying for me see all those sintax errors when Im pretty sure that my sintax is correct.
My application is already done and works perfeclty on a symbian mobile phone (I edited the code with note-pad XD), but I need to integrate it under an IDE cause it is required for a software architecture assignment. When i saw that eric IDE can generate class diagrams and code documentation I thought that was insteresting working with it.
I started to follow this interesting thread few days ago, but now Im stuck because of the sintax checker. I also have to use an external terminal to build the *.sis file. Now, under my situation, Eric ide is just useful for editing the code but not for cheking sintax or running commands (under my working directory) like this one:
py2sis hello.py hello.sis --uid=0x0FFFFFFF --appname=hello (At the eric terminal, it doesnt works but on an external one I work with out any problems)
So, my questions are:
Is there any way to configure the sintax checker? Can I run external commands like the above one without leaving the eric enviroment?
Instead of eric4 I installed the eric5, I didnt have any problems with all the prerequisites and Im working under windows XP.
Best Regards and sorry for my english.Napster85 20:28, 11 April 2012 (EEST)