Gentoo Archives: gentoo-soc

From: "Jiale Pan (Kyle Pan)" <kyle.j.pan@×××××.com>
To: gentoo-soc@l.g.o, Serkan Kaba <serkan@g.o>
Subject: [gentoo-soc] Gentoo/Java integration Project Weekly report #2
Date: Sun, 29 May 2011 11:29:56
Message-Id: 4DE22DA9.1010909@gmail.com
1 Hi everyone,
2 This is second weekly report of my Gsoc Project--Gentoo/Java integration
3
4 First some introduction to the project:
5 -----------------------project introduction--------------------------------
6 The project includes an improvement to current java-config and a new
7 eclipse-plugin. The plug-in, which when clicked, lists system installed java
8 libraries for users to select and import into projects. This avoids user
9 manually browses and locates system installed libraries, making developing more
10 efficient and comfortable. The existing tool java-config, with some necessary
11 improvements, is chosen as the data retrieval backend of this project. Jython
12 is used to integrate java-config to the plug-in.This project will mainly
13 benefit developers using eclipse, and due to planned work on improvements to
14 java-config, it will benefit java-config project and even non-developer gentoo
15 users as well.
16
17 ------------------------progress of this week --------------------------------
18
19
20 In this week I read a lot of Python docs and did a lot of practice. During the
21 time from a newbie of Python to now that I can say I'm quite familiar with
22 Python, I learned a lot.
23 Base on that, I read through the java-config source code and add the two
24 functionalities to it as planned:
25 1. add query package's javadoc path of specified package functionality.
26 *currently usage: java-config -D PACKAGE ,--javadoc=PACKAGE to do that
27 2. add query package's javasrc path of specified package functionality.
28 *currently usage: java-config -C PACKAGE, --src=PACKAGE to do that.
29
30 (if -D and/or -C options are not proper (eg reserved for other use,etc.) or
31 there are other considerations, please mention it in reply and I can change to
32 other words)
33
34 ---------------------------------issues-----------------------------------
35
36 I've already mentioned the compatibility issue in my last weekly report. But
37 still I cannot decide a solution. Since my mentor is devaway(he mentioned in
38 his last mail),so ***I'd like to ask experienced developers for help here***.
39 And thanks in advance:
40
41 At my current knowledge of Python I think it is impossible to write one code
42 snippet in Exception handling that both compile in Python 2.5 and 3.1:
43
44 Python 2.5 takes " except UnexistingPackageError, e" Syntax
45 while Python 3.1 takes "except UnexistingPackageError as e". Syntax.
46
47 I have to write Python 2.5 compatible code( because the latest Jython is 2.5
48 and I'm intended to use it in my eclipse plugin). But when emerging my
49 java-config[1], at "Compilation and optimization of Python modules for CPython
50 3.1" stage, it gives this error:
51
52 --------------------
53 * Compilation and optimization of Python modules for CPython 2.6 ...
54 * Compilation and optimization of Python modules for CPython 3.1 ...
55 *** Error compiling
56 /usr/lib64/python3.1/site-packages/java_config_2/EnvironmentManager.py ...
57 File
58 "/usr/lib64/python3.1/site-packages/java_config_2/EnvironmentManager.py", line 59
59 except InvalidVMError, ex:
60 ^
61 SyntaxError: invalid syntax
62 <<< /usr/lib64/python3.1/site-packages/java_config_2/EnvironmentManager.py[co [
63 !! ]
64 * Updating desktop mime database ...
65 ----------------------
66
67 Since my improved version of java-config is intended to work in Python 3.1 as
68 well, one solution I thought is directly patch the src code to let it in Python
69 3.1 Syntax after "* Compilation and optimization of Python modules for CPython
70 2.6 ..." finishes and before
71 "* Compilation and optimization of Python modules for CPython 3.1 ..." starts.
72 The problem is that I've read java-config's ebuild but had difficulties in
73 locating at what function call this step happens. Also I'm not sure patch in
74 that time is acceptable or not.( I've read the ebuild guild and it says all
75 patches should normally be done in src_prepare().)
76
77 ***So I'd like ask for suggestions about dealing with this issue. Or other
78 possible ways.*** Thanks.
79
80 --------------------Plans for next week ---------------------------------------
81
82 As my plans in proposal my javadoc and javasrc functionalities adding is done
83 in 3rd week of Gsoc time, so I'm one week ahead of plan. Ahead of plan is good
84 I think, and in my next week I'll:
85 1.Besides asking for suggestions, I'll continue research by myself on the above
86 issue.
87 2.Begin GenEclipse plugin work
88
89
90
91 [1] my branch of java-config:
92 http://overlays.gentoo.org/svn/proj/java/projects/java-config-2/branches/kylepan/java-config-2.1.9999k.ebuild
93
94
95 --
96 Best regards,
97 Jiale Pan(Kyle Pan)

Replies