×
Namespaces

Variants
Actions

Archived:Configuring Eric IDE for PySymbian development

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: 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 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.

Featured Article
13 Sep
2009
Article Metadata
Article
Created: sam_bakki (15 Jul 2009)
Last edited: hamishwillee (31 May 2013)

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 ..
    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 ..
    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".

Screenshots

This page was last modified on 31 May 2013, at 04:07.
248 page views in the last 30 days.
×