|
Last Site Update: 09 December 2009 | Latest Version: 1.5.3 |
|
|
|
|
|
|
|
![]() |
![]() |
|
|
|
||||
Developers GuideContents This page shows how to effectively get up and running with the pydev code. Getting the codeThe first thing you probably want to do in order to code in pydev is getting its code. Pre-requisites: Eclipse SDK 3.5.0, Git and Java 5.0 (note that other versions of those should work too but details may differ a bit) Before getting the code, there's an important step you need to make: Change your java 'compiler compliance-level' to 5.0. To do this, go to window > preferences > Java > compiler and change that setting from 1.4 to 5.0. RepositoryGet the code with Git from https://github.com/aptana/Pydev (or you may browse it to get a zip with the contents) And later go to: File > Import > Existing projects into workspace and point it to the root of the repository you just downloaded. Configuring the environment after getting the codeAfter you do that, you'll probably note that the tests did not compile successfully. This is because there are some settings that will depend on your installation, and this settings are stored in a class that holds that info (which you'll have to create). There is a 'template' for that file at: org.python.pydev.core/tests/org.python.pydev.core/TestDependent.OS.template. You should create a copy of that file in that same dir named TestDependent.java and set the needed things according to your installation. If there is still something that does not compile, it may mean that:
Where to start?Ok, this may be the most difficult thing... especially because answers may change a lot depending on what you want to do, so, below are outlined 2 different approaches:
To start in any of those approaches it might be worth taking a look at some Eclipse documentation, to try to grasp some of its concepts. One of the finest documentations for that is the Eclipse FAQ. If you want to take the Jython approach, check out this article on how to do jython scripting in pydev And that's it. If you have further doubts about how to code in pydev, direct your questions to the pydev-code list at sourceforge. Creating a distribution locallyProvided that the steps were followed, Pydev should have the following structure:
Now, on to the build: start a shell and make sure ant is in your PATH and the JAVA_HOME is properly set. In windows (update paths accordingly): set PATH=%PATH%;W:\eclipse_350_clean\plugins\org.apache.ant_1.7.0.v200803061910\bin set JAVA_HOME=D:\bin\jdk_1_5_09 For the other instructions, we'll supose that pydev was downloaded to c:/pydev and the structure we have is:
Go to the folder: c:/pydev/builders/org.python.pydev.build And type the following command (customizing the variables as explained below) ant -DbuildDirectory=c:/pydev -Dbaseos=win32 -Dbasews=win32 -Dbasearch=x86 -Ddeploy.dir=c:/pydev/pydev_deploy -DcleanAfter=false -Dvanilla.eclipse=W:/eclipse_350_clean
And that's it, if everything went OK, you should have created an update site at the deploy dir specified (and the zip distribution should be there too). Contributing backIf you do some change at pydev that you want to contribute back to the main trunk, you should create a patch and attach it to a bug in the sourceforge tracker with the title: [PATCH] description of the patch NOTE 1: Diffs do not work well for binary files, so, if you made some change to some image, please attach the changed image itself, pointing the complete location to the image when attaching it to the bug. NOTE 2: If you did some whole new script that uses the 'jython scripting in pydev' infrastructure, you do not need to create a patch. Just attach the script itself to the bug. |
|||||
|
Copyright: Aptana, Inc. 2008-2009 |