{"id":19,"date":"2007-01-11T15:41:18","date_gmt":"2007-01-11T22:41:18","guid":{"rendered":"http:\/\/blog.mozilla.org\/axel\/2007\/01\/11\/python-coming-to-a-build-near-you\/"},"modified":"2007-04-30T17:36:43","modified_gmt":"2007-05-01T00:36:43","slug":"python-coming-to-a-build-near-you","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/axel\/2007\/01\/11\/python-coming-to-a-build-near-you\/","title":{"rendered":"python coming to a build near you"},"content":{"rendered":"<p>As a heads-up, I&#8217;m making some progress to use a single python process per jar.mn in <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=361583\">bug 361583<\/a>. AFAICT, I have all the odd ends figured out to merely run one python script per <code>jar.mn<\/code>, instead of starting a two perl processes per <code>jar.mn<\/code>, and one per preprocessed entry, plus two calls for zip.<\/p>\n<p>I had to port preprocessor.pl and make-jars.pl over from single scripts to modules. Porting them to python looked like the smaller change at the time, even though I needed to code quite a bit to actually get &#8216;!&#8217; working in the preprocessor. Damn python for using <code>not<\/code> to negate expressions. And I had to subclass zipfile.ZipFile to implement overwriting entries in zip files. That seems to work, now I need to hook it up to the jar maker, which currently only does flat chrome. Oh, and I need to make that code readable for people that don&#8217;t have direct access to my brain.The good news is, it seems to be blazing fast, my test suite contains a copy browser\/base right now, and the current realchrome target takes some 4 seconds on my windows machine, the new one takes less than a second.<\/p>\n<p>Oh, and yes, this is really a step on my path to require python and just python for localizers to create langpacks, and then repackage builds, too.<\/p>\n<p>From a requirements point of view, I&#8217;ll be testing this at least on python 2.3 and python 2.4, I don&#8217;t have python 2.5 installed on one of my machines just yet. Which I should, as in particular the zip stuff seems to have changed in the backbone.<\/p>\n<p>The Preprocessor.py is attached to the bug, so if you want to have a look, be my guest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a heads-up, I&#8217;m making some progress to use a single python process per jar.mn in bug 361583. AFAICT, I have all the odd ends figured out to merely run one python script per jar.mn, instead of starting a two perl processes per jar.mn, and one per preprocessed entry, plus two calls for zip. I [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,5],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/19"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}