From: <otm...@us...> - 2009-01-08 22:54:12
|
Revision: 5893 http://jython.svn.sourceforge.net/jython/?rev=5893&view=rev Author: otmarhumbel Date: 2009-01-08 22:54:04 +0000 (Thu, 08 Jan 2009) Log Message: ----------- rename the jython*.jar files: jython.jar is now called jython-dev.jar jython-complete.jar is now called jython.jar the one we distribute is jython.jar, containing the necessary external libraries, mangled jython-dev.jar is intended for local developer usage, containing no external libraries, referencing the real external package names Modified Paths: -------------- trunk/installer/src/java/org/python/util/install/JarInstaller.java trunk/installer/test/java/org/python/util/install/driver/StandaloneVerifierTest.java trunk/jython/bugtests/README.txt trunk/jython/bugtests/test386.py trunk/jython/bugtests/test394.py trunk/jython/bugtests/test394jar/MANIFEST.MF trunk/jython/build.xml trunk/jython/src/org/python/core/PySystemState.java trunk/jython/src/org/python/util/JythoncAntTask.java trunk/jython/src/shell/jython trunk/jython/src/shell/jython.bat Modified: trunk/installer/src/java/org/python/util/install/JarInstaller.java =================================================================== --- trunk/installer/src/java/org/python/util/install/JarInstaller.java 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/installer/src/java/org/python/util/install/JarInstaller.java 2009-01-08 22:54:04 UTC (rev 5893) @@ -18,7 +18,7 @@ */ public class JarInstaller { - public static final String JYTHON_JAR = "jython-complete.jar"; + public static final String JYTHON_JAR = "jython.jar"; private static final String PATH_SEPARATOR = "/"; Modified: trunk/installer/test/java/org/python/util/install/driver/StandaloneVerifierTest.java =================================================================== --- trunk/installer/test/java/org/python/util/install/driver/StandaloneVerifierTest.java 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/installer/test/java/org/python/util/install/driver/StandaloneVerifierTest.java 2009-01-08 22:54:04 UTC (rev 5893) @@ -3,6 +3,7 @@ import java.io.File; import org.python.util.install.Installation; +import org.python.util.install.JarInstaller; import junit.framework.TestCase; @@ -58,7 +59,7 @@ assertEquals(4, command.length); assertEquals(expectedCommand, command[0]); assertEquals("-jar", command[1]); - assertEquals(prefix.concat("jython-complete.jar"), command[2]); + assertEquals(prefix.concat(JarInstaller.JYTHON_JAR), command[2]); assertEquals(expectedArgument, command[3]); } Modified: trunk/jython/bugtests/README.txt =================================================================== --- trunk/jython/bugtests/README.txt 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/bugtests/README.txt 2009-01-08 22:54:04 UTC (rev 5893) @@ -24,7 +24,7 @@ ----- java_home = "/Library/Java/Home" jython_home = "/Users/bzimmer/Development/sourceforge/jython/dist" -classpath = jython_home + "/jython.jar:classes" +classpath = jython_home + "/jython-dev.jar:classes" ----- Run the script "driver.py". Modified: trunk/jython/bugtests/test386.py =================================================================== --- trunk/jython/bugtests/test386.py 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/bugtests/test386.py 2009-01-08 22:54:04 UTC (rev 5893) @@ -11,7 +11,7 @@ from java.io import File TESTDIR = "test386jar" -JYTHON_JAR = "jython.jar" +JYTHON_DEV_JAR = "jython-dev.jar" TEST_PY_NAME = TESTDIR +"/test386called.py" def checkTestDir(): @@ -21,11 +21,11 @@ raise AssertionError, TEST_PY_NAME + " does not exist" # create a jython standalone jar file: -# add the contents of jython.jar and /Lib files to an new jython.jar +# add the contents of jython-dev.jar and /Lib files to a new jython-dev.jar def mkjar(): - jarFile = File(TESTDIR, JYTHON_JAR) + jarFile = File(TESTDIR, JYTHON_DEV_JAR) jarPacker = support.JarPacker(jarFile) - jarPacker.addJarFile(File(cfg.jython_home + "/%s" % JYTHON_JAR)) + jarPacker.addJarFile(File(cfg.jython_home + "/%s" % JYTHON_DEV_JAR)) jarPacker.addDirectory(File(cfg.jython_home + "/Lib")) jarPacker.close() return jarFile @@ -33,5 +33,5 @@ checkTestDir() mkjar() -jarFileName = "%s/%s" % (TESTDIR, JYTHON_JAR) +jarFileName = "%s/%s" % (TESTDIR, JYTHON_DEV_JAR) support.runJavaJar(jarFileName, TEST_PY_NAME) \ No newline at end of file Modified: trunk/jython/bugtests/test394.py =================================================================== --- trunk/jython/bugtests/test394.py 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/bugtests/test394.py 2009-01-08 22:54:04 UTC (rev 5893) @@ -7,7 +7,7 @@ error importing site Traceback (innermost last): - File "C:\workspace\jython\bugtests\test394jar\jython.jar\Lib/site.py", line 210, in ? + File "C:\workspace\jython\bugtests\test394jar\jython-dev.jar\Lib/site.py", line 210, in ? TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (innermost last): File "C:/workspace/jython/bugtests/test394.py", line 71, in ? @@ -26,7 +26,7 @@ from java.io import File TESTDIR = "test394jar" -JYTHON_JAR = "jython.jar" +JYTHON_DEV_JAR = "jython-dev.jar" RUN_JAR = "run.jar" TEST_PY_NAME = TESTDIR +"/test394called.py" CLAZZ = "Runner" @@ -46,11 +46,11 @@ # create a jython standalone jar file: -# add the contents of jython.jar and /Lib files to an new jython.jar +# add the contents of jython-dev.jar and /Lib files to a new jython-dev.jar def mkJythonJar(): - jarFile = File(TESTDIR, JYTHON_JAR) + jarFile = File(TESTDIR, JYTHON_DEV_JAR) jarPacker = support.JarPacker(jarFile) - jarPacker.addJarFile(File(cfg.jython_home + "/%s" % JYTHON_JAR)) + jarPacker.addJarFile(File(cfg.jython_home + "/%s" % JYTHON_DEV_JAR)) jarPacker.addDirectory(File(cfg.jython_home + "/Lib")) jarPacker.close() return jarFile @@ -59,7 +59,7 @@ def mkJavaClass(): support.compileJava("%s/%s.java" % (TESTDIR, CLAZZ)) -# create a runnable jar file with a manifest referring to jython.jar +# create a runnable jar file with a manifest referring to jython-dev.jar def mkRunJar(): jarFile = File(TESTDIR, RUN_JAR) manifestFile = File(TESTDIR, MANIFEST) Modified: trunk/jython/bugtests/test394jar/MANIFEST.MF =================================================================== --- trunk/jython/bugtests/test394jar/MANIFEST.MF 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/bugtests/test394jar/MANIFEST.MF 2009-01-08 22:54:04 UTC (rev 5893) @@ -1,4 +1,4 @@ Manifest-Version: 1.0 -Class-Path: . jython.jar +Class-Path: . jython-dev.jar Main-Class: test394jar.Runner Modified: trunk/jython/build.xml =================================================================== --- trunk/jython/build.xml 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/build.xml 2009-01-08 22:54:04 UTC (rev 5893) @@ -172,8 +172,8 @@ <!-- 64 bit Java 6 needs roughly 96m for regrtest on most platforms, but Apple's needs more --> <property name="regrtest.Xmx" value="-Xmx160m" /> - <property name="jython.dev.jar" value="jython.jar" /> - <property name="jython.deploy.jar" value="jython-complete.jar" /> + <property name="jython.dev.jar" value="jython-dev.jar" /> + <property name="jython.deploy.jar" value="jython.jar" /> </target> <target name="version-init"> @@ -804,6 +804,7 @@ <java classname="org.python.util.jython" fork="true" dir="${bugtests.dir}"> <classpath> <pathelement location="${dist.dir}/${jython.dev.jar}"/> + <fileset dir="${dist.dir}/javalib"/> </classpath> <jvmarg value="-Dpython.home=${dist.dir}"/> <arg value="driver.py"/> Modified: trunk/jython/src/org/python/core/PySystemState.java =================================================================== --- trunk/jython/src/org/python/core/PySystemState.java 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/src/org/python/core/PySystemState.java 2009-01-08 22:54:04 UTC (rev 5893) @@ -34,7 +34,7 @@ protected static final String CACHEDIR_DEFAULT_NAME = "cachedir"; public static final String JYTHON_JAR = "jython.jar"; - public static final String JYTHON_COMPLETE_JAR = "jython-complete.jar"; + public static final String JYTHON_DEV_JAR = "jython-dev.jar"; private static final String JAR_URL_PREFIX = "jar:file:"; private static final String JAR_SEPARATOR = "!"; @@ -490,9 +490,9 @@ String classpath = preProperties.getProperty("java.class.path"); if (classpath != null) { String lowerCaseClasspath = classpath.toLowerCase(); - int jarIndex = lowerCaseClasspath.indexOf(JYTHON_COMPLETE_JAR); + int jarIndex = lowerCaseClasspath.indexOf(JYTHON_JAR); if (jarIndex < 0) { - jarIndex = lowerCaseClasspath.indexOf(JYTHON_JAR); + jarIndex = lowerCaseClasspath.indexOf(JYTHON_DEV_JAR); } if (jarIndex >= 0) { int start = classpath.lastIndexOf(java.io.File.pathSeparator, jarIndex) + 1; Modified: trunk/jython/src/org/python/util/JythoncAntTask.java =================================================================== --- trunk/jython/src/org/python/util/JythoncAntTask.java 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/src/org/python/util/JythoncAntTask.java 2009-01-08 22:54:04 UTC (rev 5893) @@ -59,6 +59,7 @@ import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.DirectoryScanner; +import org.python.core.PySystemState; import java.io.File; @@ -414,7 +415,7 @@ javaTask.createJvmarg().setValue( "-Dpython.home=" + getPythonHome() ); // classpath - File aJythonJarFile = new File(getPythonHome(), "jython.jar" ); + File aJythonJarFile = new File(getPythonHome(), PySystemState.JYTHON_JAR ); createClasspath().setLocation(aJythonJarFile); javaTask.setClasspath(classpath); Modified: trunk/jython/src/shell/jython =================================================================== --- trunk/jython/src/shell/jython 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/src/shell/jython 2009-01-08 22:54:04 UTC (rev 5893) @@ -53,12 +53,12 @@ # current dir is not the script dir JYTHON_HOME_1=`dirname "$PRG"` fi - if [ -f "$JYTHON_HOME_1"/jython-complete.jar -o -f "$JYTHON_HOME_1"/jython.jar ] ; then + if [ -f "$JYTHON_HOME_1"/jython.jar -o -f "$JYTHON_HOME_1"/jython-dev.jar ] ; then JYTHON_HOME="$JYTHON_HOME_1" else JYTHON_HOME=`dirname "$JYTHON_HOME_1"` fi - if [ ! -f "$JYTHON_HOME"/jython-complete.jar -a ! -f "$JYTHON_HOME"/jython.jar ] ; then + if [ ! -f "$JYTHON_HOME"/jython.jar -a ! -f "$JYTHON_HOME"/jython-dev.jar ] ; then JYTHON_HOME="$JYTHON_HOME_FALLBACK" fi fi @@ -69,7 +69,7 @@ CP_DELIMITER=":" -CP=$JYTHON_HOME/jython.jar +CP=$JYTHON_HOME/jython-dev.jar if [ -f "$CP" ] ; then # add necessary jars for command-line execution @@ -80,13 +80,13 @@ CP="$j" fi done -elif [ ! -f "$JYTHON_HOME"/jython-complete.jar ] ; then - echo "$0: $JYTHON_HOME contains neither jython.jar nor jython-complete.jar." >&2 +elif [ ! -f "$JYTHON_HOME"/jython.jar ] ; then + echo "$0: $JYTHON_HOME contains neither jython-dev.jar nor jython.jar." >&2 echo "Try running this script from the 'bin' directory of an installed Jython or " >&2 echo 'setting $JYTHON_HOME.' >&2 exit 1 else - CP=$JYTHON_HOME/jython-complete.jar + CP=$JYTHON_HOME/jython.jar fi if $cygwin; then Modified: trunk/jython/src/shell/jython.bat =================================================================== --- trunk/jython/src/shell/jython.bat 2009-01-08 22:05:28 UTC (rev 5892) +++ trunk/jython/src/shell/jython.bat 2009-01-08 22:54:04 UTC (rev 5893) @@ -44,31 +44,31 @@ pushd "%~dp0%" set _JYTHON_HOME="%CD%" popd +if exist %_JYTHON_HOME%\jython-dev.jar goto gotHome if exist %_JYTHON_HOME%\jython.jar goto gotHome -if exist %_JYTHON_HOME%\jython-complete.jar goto gotHome pushd "%~dp0%\.." set _JYTHON_HOME="%CD%" popd +if exist %_JYTHON_HOME%\jython-dev.jar goto gotHome if exist %_JYTHON_HOME%\jython.jar goto gotHome -if exist %_JYTHON_HOME%\jython-complete.jar goto gotHome rem jython home fallback (if all else fails) rem if present, %JYTHON_HOME_FALLBACK% is already quoted set _JYTHON_HOME=%JYTHON_HOME_FALLBACK% :gotHome -if not exist %_JYTHON_HOME%\jython.jar goto tryComplete +if not exist %_JYTHON_HOME%\jython-dev.jar goto tryComplete rem prefer built version -set _CP=%_JYTHON_HOME%\jython.jar +set _CP=%_JYTHON_HOME%\jython-dev.jar for %%j in (%_JYTHON_HOME%\javalib\*.jar) do ( set _CP=!_CP!;"%%j" ) goto run :tryComplete -set _CP=%_JYTHON_HOME%\jython-complete.jar -if exist %_JYTHON_HOME%/jython-complete.jar goto run +set _CP=%_JYTHON_HOME%\jython.jar +if exist %_JYTHON_HOME%/jython.jar goto run -echo Cannot find jython.jar or jython-complete.jar in %_JYTHON_HOME% +echo Cannot find jython-dev.jar or jython.jar in %_JYTHON_HOME% echo Try running this batch file from the 'bin' directory of an installed Jython, echo or setting JYTHON_HOME. goto cleanup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |