Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linux-distros-dev] Backporting PyDev to Java 1.4

I'm attaching another patch that ads a TestDependent.java file in
org.python.pydev.core/tests, which is needed if you want to run
the tests, or if you want all of the plugins to be able to build
cleanly from within Eclipse. It currently contains Windows-specific
constants that were taken from TestDependent.template, but at least
it makes it build. I'll figure out more useful constants later to
actually make the tests run and then repost a new patch.

Thanks,
Igor

On Tue, 2006-06-06 at 00:08 -0400, Igor Foox wrote:
> Hi,
> 
> Enclosed are my patches for PyDev 1.0.8. I am using Ben Konrath's
> package-build patch to build these. Here are the steps that need
> to be done to build pydev:
> 
> 1. Check out from CVS with the Tag 'Pydev_1_0_8' the following modules:
> org.python.pydev
> org.python.pydev.ast
> org.python.pydev.core
> org.python.pydev.debug
> org.python.pydev.feature
> org.python.pydev.help
> org.python.pydev.jython
> org.python.pydev.parser
> org.python.pydev.templates
> 
> 2. Apply the enclosed patches.
> 
> 3. Run sed to replace the plugin version (unfotunately the version
> number is left as 0.9.7.1 in CVS):
> # Replace all references to 0.9.7.1 with the correct version number
> for f in `grep -rl '0.9.7.1' *` ; do
>   if [ -f $f ]; then
>     sed --in-place "s/0.9.7.1/${version}/g" $f
>   fi
> done
> 
> 4. Remove retroweaver-rt.jar, we don't use retroweaver since the source
> code is backported to Java 1.4:
> 
> find . -name 'retroweaver-rt.jar' -exec rm {} \;
> 
> 5. In fedora we also remove the jars included in the plugin and symlink
> to system jars.
> 
> 6. prepare run enviornment
> 
> 7. Run the build with:
> # build the main pydev feature
> java -cp %{eclipse_base}/startup.jar                   \
>      -Duser.home=$homedir                              \
>      org.eclipse.core.launcher.Main                    \
>      -application org.eclipse.ant.core.antRunner       \
>          -verbose \
>      -Dtype=feature                                    \
>      -Did=org.python.pydev.feature                     \
>      -DbaseLocation=$SDK                               \
>      -DsourceDirectory=$(pwd)                          \
>      -DbuildDirectory=$(pwd)/build                     \
>      -Dbuilder=
> %{eclipse_base}/plugins/org.eclipse.pde.build_3.1.2/templates/package-build
> 
> 
> The first patch (eclipse-pydev-1.0.8-backport-megapatch.patch) is the
> actual backporting, while the second (eclipse-pydev-noretroweaver.patch)
> removes the dependency on retroweaver-rt.jar from the manfiest files.
> 
> I'm still working on a patch to provide a default python interpreter
> path and site-packages path, and will hopefully have something by
> tomorrow.
> 
> Comments are welcome,
> Thanks,
> Igor
> 
> 
> On Thu, 2006-06-01 at 15:44 -0400, Igor Foox wrote:
> > Hi,
> > 
> > For those who are not familiar with it PyDev is a (the) Python
> > environment plugin for Eclipse. It currently uses Java 1.5 so it's
> > unshippable by many Linux distros. We are currently shipping version
> > 0.9.3 in Fedora, this version still uses Java 1.4 but it's quite old.
> > 
> > I know that some Ubuntu guys backported version 1.0.3 to Java 1.4
> > previously and it's currently available in Ubuntu. I recently backported
> > version 1.0.6 to Java 1.4, and I'm posting the patches here in case
> > others want to use them. I'm going to update the patches for the
> > latest version (1.0.8), which is a bug fix release, and repost them.
> > I will only be able to get to that early next week, so if anybody wants
> > to do it, I'll be more than happy :-).
> > 
> > I'm also planning to make some other patches that will set some useful
> > defaults in the Preferences, such as the location of the Python
> > interpreter and the site-packages directory. This will probably be
> > slightly different for the various distros but that's a small
> > difference.
> > 
> > I'm happy to take any criticism about the patch. ;-)
> > Igor
> > 
> > P.S. From minimal testing it seems to work fine, but I haven't run
> > the test suit on it yet.
> > 
> > 
> > _______________________________________________
> > linux-distros-dev mailing list
> > linux-distros-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/linux-distros-dev
> _______________________________________________
> linux-distros-dev mailing list
> linux-distros-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/linux-distros-dev
--- /dev/null	2006-06-02 09:11:39.438467500 -0400
+++ org.python.pydev.core/tests/org/python/pydev/core/TestDependent.java	2006-06-02 16:33:25.000000000 -0400
@@ -0,0 +1,39 @@
+/*
+ * Create a file TestDependent.java with the contents in this file and substitute the
+ * values as needed...
+ */
+package org.python.pydev.core;
+
+public class TestDependent {
+
+    //NOTE: this should be gotten from some variable to point to the python lib (less system dependence, but still, some).
+    public static String PYTHON_EXE="D:/bin/Python24/python.exe";
+    public static final String PYTHON_INSTALL="D:/bin/Python24/";
+    public static final String PYTHON_LIB="D:/bin/Python24/Lib/";
+    public static final String PYTHON_SITE_PACKAGES="D:/bin/Python24/Lib/site-packages/";
+    public static final String PYTHON_WXPYTHON_PACKAGES="D:/bin/Python24/Lib/site-packages/wx-2.6-msw-ansi/";
+    public static final String PYTHON_NUMARRAY_PACKAGES="D:/bin/Python24/Lib/site-packages/numarray/";
+    
+    //NOTE: this should set to the tests pysrc location, so that it can be added to the pythonpath.
+    public static final String TEST_PYDEV_BASE_LOC = "E:/eclipse_workspace/";
+    public static final String TEST_PYSRC_LOC=TEST_PYDEV_BASE_LOC+"org.python.pydev/tests/pysrc/";
+    public static final String TEST_PYSRC_LOC2=TEST_PYDEV_BASE_LOC+"org.python.pydev/tests/pysrc2/";
+    public static final String TEST_PYDEV_PLUGIN_LOC = "E:/eclipse_workspace/org.python.pydev/";
+    public static final String TEST_PYDEV_JYTHON_PLUGIN_LOC = "E:/eclipse_workspace/org.python.pydev.jython/";
+    public static final String TEST_PYDEV_PARSER_PLUGIN_LOC = TEST_PYDEV_BASE_LOC+"org.python.pydev.parser/";
+
+    //java info
+    public static final String JAVA_LOCATION="C:/Program Files/Java/jre1.5.0_04/bin/java.exe";
+    public static final String JAVA_RT_JAR_LOCATION= "C:/Program Files/Java/jre1.5.0_04/lib/rt.jar";
+    
+    public static final String JYTHON_JAR_LOCATION="D:/bin/jython21/jython.jar";
+    public static final String JYTHON_LIB_LOCATION="D:/bin/jython21/lib/";
+    
+    //we cannot test what we don't have...
+    public static final boolean HAS_WXPYTHON_INSTALLED = false;
+    public static final boolean HAS_QT_INSTALLED = true;
+    public static final boolean HAS_GLU_INSTALLED = true;
+    public static final boolean HAS_SWT_ON_PATH = false;
+    public static final boolean HAS_NUMARRAY_INSTALLED = true;
+	public static final boolean HAS_MX_DATETIME = false;
+}

Back to the top