From patchwork Tue Mar 22 20:07:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Hudson-Doyle X-Patchwork-Id: 743 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:20 -0000 Delivered-To: patches@linaro.org Received: by 10.204.113.5 with SMTP id y5cs15213bkp; Tue, 22 Mar 2011 13:07:24 -0700 (PDT) Received: by 10.216.246.5 with SMTP id p5mr5167074wer.64.1300824443819; Tue, 22 Mar 2011 13:07:23 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id o52si13912278wee.159.2011.03.22.13.07.23; Tue, 22 Mar 2011 13:07:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of michael.hudson@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of michael.hudson@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=michael.hudson@canonical.com Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q27rP-0000mm-Cz for ; Tue, 22 Mar 2011 20:07:23 +0000 Received: from [120.136.5.9] (helo=grond) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Q27rO-0000xE-Pt for patches@linaro.org; Tue, 22 Mar 2011 20:07:23 +0000 Received: by grond (Postfix, from userid 1000) id 0AA2E9611E; Wed, 23 Mar 2011 09:07:16 +1300 (NZDT) From: Michael Hudson-Doyle To: patches@linaro.org Subject: [Michael Hudson-Doyle] [Merge] lp:~mwhudson/lazr-js/combo-mod_wsgi-config into lp:lazr-js User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Date: Wed, 23 Mar 2011 09:07:16 +1300 Message-ID: <87lj06or63.fsf@canonical.com> MIME-Version: 1.0 Content-Disposition: inline Michael Hudson-Doyle has proposed merging lp:~mwhudson/lazr-js/combo-mod_wsgi-config into lp:lazr-js. Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~mwhudson/lazr-js/combo-mod_wsgi-config/+merge/54140 Hi, This branch adds a combo.wsgi file for running the combo server with mod_wsgi. Cheers, mwh === added file 'combo.wsgi' --- combo.wsgi 1970-01-01 00:00:00 +0000 +++ combo.wsgi 2011-03-21 01:15:46 +0000 @@ -0,0 +1,16 @@ +import os +import site +import sys + +# If you have some lazr modules installed but lazr-js is not installed in a +# system location, the lazr 'namespace package' interferes with importing the +# lazr-js code. +sys.modules.pop('lazr', None) + +ROOT = os.path.dirname(__file__) + +sys.path.insert(0, os.path.join(ROOT, 'src-py')) + +from lazr.js.combo import combo_app + +application = combo_app(os.path.join(ROOT, "build")) === modified file 'src-py/lazr/js/build.py' --- src-py/lazr/js/build.py 2011-01-10 14:36:00 +0000 +++ src-py/lazr/js/build.py 2011-03-21 01:15:46 +0000 @@ -13,12 +13,13 @@ from glob import glob import cssutils -import pkg_resources HERE = os.path.dirname(__file__) BUILD_DIR = os.path.normpath(os.path.join(HERE, '..', '..', '..', 'build')) -SRC_DIR = pkg_resources.resource_filename( - pkg_resources.Requirement.parse("lazr-js"), "lazrjs") +SRC_DIR = os.path.normpath(os.path.join(HERE, '..', '..', '..')) + +##SRC_DIR = pkg_resources.resource_filename( +## pkg_resources.Requirement.parse("lazr-js"), "lazrjs") ESCAPE_STAR_PROPERTY_RE = re.compile(r'\*([a-zA-Z0-9_-]+):') UNESCAPE_STAR_PROPERTY_RE = re.compile(r'([a-zA-Z0-9_-]+)_ie_star_hack:')