def mkRunJar(): jarFile = File(TESTDIR, RUN_JAR) manifestFile = File(TESTDIR, MANIFEST) jarPacker = support.JarPacker(jarFile) jarPacker.addManifestFile(manifestFile) jarPacker.addFile(File(TESTDIR, CLAZZ + ".class"), TESTDIR) jarPacker.close()
def mkjar(): jarFile = File(TESTDIR, JYTHON_DEV_JAR) jarPacker = support.JarPacker(jarFile) jarPacker.addJarFile(File(cfg.jython_home + "/%s" % JYTHON_DEV_JAR)) jarPacker.addDirectory(File(cfg.jython_home + "/Lib")) jarPacker.close() return jarFile
def mkjar(): mkdir(JARDIR) jarFile = File(JARDIR, JARFILE) jarPacker = support.JarPacker(jarFile, bufsize=128) jarPacker.addFile(GOOD_CLAZZ_FILE, parentDirName=PACKAGE) jarPacker.addFile(BAD_CLAZZ_FILE, parentDirName=PACKAGE) jarPacker.close() return jarFile
def mkjar(): jarfile = File(jardir, jarfn) # create a .jar file containing a .class file if not jarfile.exists(): support.compileJava("%s/%s/%s.java" % (jardir, package, clazz)) jarPacker = support.JarPacker(jarfile, bufsize=128) jarPacker.addFile(clazzfile, parentDirName=package) jarPacker.close() return jardir + '/' + jarfn, package, clazz