[Jython-checkins] jython: Ensure that compiled $py.class files are included for standalone, full jars

jim.baker jython-checkins at python.org
Sat Mar 21 05:54:58 CET 2015


https://hg.python.org/jython/rev/72cf10235676
changeset:   7626:72cf10235676
user:        Jim Baker <jim.baker at rackspace.com>
date:        Fri Mar 20 22:54:54 2015 -0600
summary:
  Ensure that compiled $py.class files are included for standalone, full jars

Changed task dependencies to ensure compiled Python classes are built.

Fixed problem such that standalone jar (jython-standalone.jar) was
being built with jarjar task, but this was unnecessary and caused a
problem: the shading had already been applied in building
jython.jar. Switched to the standard jar task, which allowed for the
compiled $py.class files to be directly added, without jarjar task
moving them in the resulting jar.

Fixes http://bugs.jython.org/issue2282

files:
  build.xml |  14 +++++++-------
  1 files changed, 7 insertions(+), 7 deletions(-)


diff --git a/build.xml b/build.xml
--- a/build.xml
+++ b/build.xml
@@ -569,7 +569,7 @@
             includesfile="${jython.base.dir}/CoreExposed.includes"/>
     </target>
 
-    <target name="jar-complete" depends="jar">
+    <target name="jar-complete" depends="jar, pycompile">
         <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="extlibs/jarjar-1.4.jar"/>
         <jarjar destfile="${dist.dir}/${jython.deploy.jar}">
             <zipfileset src="${dist.dir}/${jython.dev.jar}"/>
@@ -646,12 +646,12 @@
         </jarjar>
     </target>
 
-<target name="jar-standalone" depends="jar-complete, copy-lib">
+    <target name="jar-standalone" depends="jar-complete">
         <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="extlibs/jarjar-1.4.jar"/>
-        <jarjar destfile="${dist.dir}/${jython.standalone.jar}">
-            <zipfileset src="${dist.dir}/${jython.deploy.jar}"/>
-            <fileset dir="${dist.dir}" includes="Lib/**"/>
-            <manifest>
+        <jar destfile="${dist.dir}/${jython.standalone.jar}">
+	  <zipfileset src="${dist.dir}/${jython.deploy.jar}"/>
+	  <fileset dir="${dist.dir}" includes="Lib/**" excludes="Lib/test/**" />
+          <manifest>
                 <attribute name="Main-Class" value="org.python.util.jython" />
                 <attribute name="Built-By" value="${user.name}" />
                 <!-- info section. ATTN: no blanks, no '.' in the names -->
@@ -665,7 +665,7 @@
                     <attribute name="debug" value="${debug}" />
                 </section>
             </manifest>
-        </jarjar>
+	</jar>
     </target>
 
     <target name="jar" depends="compile,expose">

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list