[Jython-dev] Pre-release progress
by Kevin Butler other posts by this author
Apr 18 2003 11:16AM messages near this date
[Jython-dev] RE: [Jython-users] Jython string coercion to java String
|
Re: [Jython-dev] Pre-release progress
I've tagged as Release_2_2alpha0. Brian Zimmer updated the zxJDBC classes.
I've got a jython22a0.class file built, but it doesn't quite work.
It prompts for the OS (didn't know it could do that), then fails to load
os.properties (from where?
I don't know yet).
Getting the liftoff installer to work is no trivial feat. I'm not sure
if the liftoff installer
has just regressed since Finn used it last, or if he worked around all
these issues
to get the installer out. The build scripts, etc., are broken in
miscellaneous ways,
some obvious (missing % symbols) and some less obvious (failing to copy
files).
Here are my notes so far (personal notes, so don't expect much
readability!).
Note the caveats at the end.
I hope to have a functional installer sometime this weekend.
kb
3rd-party package sources:
JavaCC
License: Custom, does *NOT* allow redistribution
Only needed if you change the Jython grammar.
http://www.webgain.com/products/java_cc/
PyXML
License: Python license
Needed to copy PyXML files to jython.
http://pyxml.sourceforge.net/
Jikes
License: IBM Public License (allows redistribution)
Alternate compiler for Java code, can use classic javac compiler instead.
Selected by build.compiler = classic or build.compiler = jikes
http://oss.software.ibm.com/developerworks/opensource/jikes/
Python2.2
License: Python license
Used for python library (?) and for building documentation and installing
PyXML source.
http://www.python.org
HT2HTML
License: Python license
Used for building documentation
http://ht2html.sourceforge.net/
servlet.jar
License: Apache Software License, BSD-style
Used for building PyServlet support. Can obtain from Tomcat project,
installed tomcat/common/lib/servlet.jar
http://jakarta.apache.org/tomcat/index.html
java_readline / libreadline-java.jar
License: LGPL, note that the Unix libreadline.so is GPL
Used for building Readline support (Unix only). Build as JAVAC=javac
make, don't worry about errors if missing C libraries, etc., as Jython
only needs the jar file to meet the Java dependencies.
http://java-readline.sourceforge.net/
Database modules, needed for building zxJDBC DataHandlers
JDBC (javax.sql)
License: Custom, distribute unmodified .jar bundled with your software
Download from java.sun.com ("JDBC 2.0 Optional Package Binary"), or just
get the MySql connector below,
as it contains the jdbc2_0-stdext.jar
http://java.sun.com/products/jdbc/download.html#spec
Oracle
License: Custom, export restrictions, allows distribute to customers
Choose JDBC drivers, pick a recent Oracle version, and download
classes12.zip for JDK1.2 or 1.3, classes111.zip for JDK1.1, or odjbc.jar
for jdk1.4
http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
J/Connector for MySql
License: GPL
Selected 3.0, the most recent Production release.
http://www.mysql.com/downloads/api-jdbc-stable.html
PostgreSQL
License: BSD
Get the pg73jdbc1.jar (Want to preserve JDK1.1 compatibility)
http://jdbc.postgresql.org/
Informix
License: Custom, strange - can make "copies to support the level of use
authorized" whatever that means
Download the JDBC drivers, extract, run java -jar setup.jar
http://www-3.ibm.com/software/data/informix/tools/jdbc/
LiftOff Installer
License: GPL
Download via CVS
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/liftoff login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/liftoff co liftoff
--------------------
Building jython:
ant dist
# if you ever do ant clean, you'll need to do
# cvs upd -APd
# to get back the PythonGrammar* classes (clean removes them)
# unless you've installed javacc
--------------------
Jython tests:
# you'll need ~200 MB of RAM + swap for some of these tests
# If using a JRE, need to add a path to a JDK's tools.jar
# set JYTHON_JAVA_ARGS -Dtoolsjar=d:/pipeline/products/jdk/lib/tools.jar
# The javashell test is sensitive to other output from your jython script,
# and to multiple layers of script wrapping. Best to ensure that
# $JYTHONCVS/jython is the first 'jython' in yuor PATH.
export JYTHONCVS=d:/kb/jython_src
export PATH="$JYTHONCVS:$PATH"
cd $JYTHON_CVS/Lib/test/ javatests
javac -d .. *.java
cd ..
jythoncvs testall.py
#### before complaining that tests don't pass, make sure that you're running
#### with the CVS version of Jython!
--------------------
Postgres on NT notes:
export LANG=
export PGDATA=/var/lib/pgsql/data
export PATH="/usr/local/bin:$PATH"
#install cygipc 1.13 (deprecated, but necessary) from
# http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/
ipc-daemon &
export PGDATA=/var/lib/pgsql/data
initdb (slow)
/bin/postmaster -i -D /var/lib/pgsql/data &
createdb ziclix
--------------------
MySQL on NT notes:
net start mysql
mysql/bin/MySqlAdministrator
double-click on MySql, enter connection info, OK
as a SQL query, enter:
create database ziclix
then press the "play" button. Don't expect any feedback...
(could also just create a ziclix directory under the mysql/data)
--------------------
cd $JYTHONCVS/Lib/test/zxjdbc
# customize test.xml, setting:
# - hosts & ports as needed
# - usernames & passwords as needed
# - !!! Change org.gjt paths to paths in new MySQL drivers
ipc-daemon &
/bin/postmaster -i -D /var/lib/pgsql/data &
export
CLASSPATH="d:/kb/jython_3rdparty/jdbc2_0-stdext.jar;d:/kb/jython_3rdparty/pg73jdbc1.jar"
jythoncvs runner.py test.xml postgresql
net start mysql
export
CLASSPATH="d:/kb/jython_3rdparty/jdbc2_0-stdext.jar;d:/kb/jython_3rdparty/mysql-connector-ja
va-3.0.7-stable/mysql-connector-java-3.0.7-stable-bin.jar"
jythoncvs runner.py test.xml mysql
--------------------
Building liftoff
Make sure you get liftoff CVS.
Here's how to build it:
liftoff=d:/kb/jython_3rdparty/liftoff
cd $liftoff/src
CLASSPATH="../lib/ant.jar;../lib/xml.jar" ant -f bootstrap.xml
CLASSPATH="../lib/ant.jar;../lib/xml.jar;../lib/LiftOffAnt.jar" ant
# MODIFY ../data/builder.properties to change the /home/andi/projekte/
# to d:/kb/jython_3rdparty/ (or wherever your liftoff tree lives)
# MODIFY build.xml to copy .gif files in compile-builder
<copydir src="${src.builder}"
dest="${build.builder}"
includes="**/*.gif"/>
CLASSPATH="../lib/ant.jar;../lib/xml.jar;../lib/LiftOffAnt.jar" ant
--------------------
Building Jython's installer
cd $JYTHONCVS
python installer/mklist.py > installer/liftoff.filelist
# UPDATE the product.version in liftoff.props (to something -custom)
# UPDATE the destination.package_prefix (to something appropriate)
# UPDATE PySystemState.version (to the something -custom)
java -Ddatadir=$liftoff/data -cp $liftoff/lib/LiftOff.jar
net.sourceforge.liftoff.builder.Main
File|Open
installer/liftoff.props
Create|Class
OK
The mouse doesn't "click" some buttons in the "Builder" GUI (use
Enter/Space), and if you
get a NullPointerException trying to do File|Open, just try again. (!?)
--------------------
Caveats
- I just compiled it with whatever java compiler I had handy 1.4
something (will this be JDK1.1 compatible? no?)
- On windows, so no readline library (how?)
- just grabbing almost all the .py files from the PyXML distribution
- this has a mixed bag of all the Python 2.2 modules, except those
with specific Jython counterparts. There will be library files that
don't work. Let us know about them.
- The installer .class file built by this process doesn't work yet - it
starts up, prompts for the OS (!),
then fails to load os.properties
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jython-dev mailing list
Jython-dev@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-dev
Thread:
Kevin Butler
Samuele Pedroni
Samuele Pedroni
|