Esempio n. 1
0
 def test_simple(self):
     """This just tests whether create_wininst runs at all and produces a zip-file."""
     ipackage = BuildManifest({}, {"name": "foo", "version": "1.0"}, {})
     create_wininst(ipackage, self.build_node, self.build_node, wininst="foo.exe", output_dir="dist")
     arcname = bento.commands.build_wininst.create_exe.call_args[0][1]
     fp = zipfile.ZipFile(arcname)
     try:
         fp.namelist()
     finally:
         fp.close()
Esempio n. 2
0
 def test_simple(self):
     """This just tests whether create_wininst runs at all and produces a zip-file."""
     ipackage = BuildManifest({}, {"name": "foo", "version": "1.0"}, {})
     create_wininst(ipackage,
                    self.build_node,
                    self.build_node,
                    wininst="foo.exe",
                    output_dir="dist")
     arcname = bento.commands.build_wininst.create_exe.call_args[0][1]
     fp = zipfile.ZipFile(arcname)
     try:
         fp.namelist()
     finally:
         fp.close()
Esempio n. 3
0
        create_scripts

if __name__ == "__main__":
    import tempfile

    TMPDIR = tempfile.mkdtemp()
    try:
        EGG_PATH = sys.argv[1]

        zid = zipfile.ZipFile(EGG_PATH)
        try:
            zid.extractall(path=TMPDIR)
        finally:
            zid.close()
        ipkg = InstalledPkgDescription.from_egg(EGG_PATH)

        # Build executables
        bdir = os.path.join(TMPDIR, "SCRIPTS")
        os.makedirs(bdir)
        create_scripts(ipkg.executables, bdir)
        # XXX: use internal API
        for k in ipkg.files["executables"]:
            ipkg.files["executables"][k].source_dir = bdir

        meta = PackageMetadata.from_ipkg(ipkg)
        wininst = wininst_filename(meta.fullname)
        create_wininst(ipkg, src_root_dir=TMPDIR, wininst=wininst)
    finally:
        #shutil.rmtree(TMPDIR)
        pass