Merge lp:~mwhudson/lazr-js/combo-mod_wsgi-config into lp:lazr-js

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: 210
Merged at revision: 208
Proposed branch: lp:~mwhudson/lazr-js/combo-mod_wsgi-config
Merge into: lp:lazr-js
Diff against target: 38 lines (+17/-3)
2 files modified
combo.wsgi (+16/-0)
src-py/lazr/js/build.py (+1/-3)
To merge this branch: bzr merge lp:~mwhudson/lazr-js/combo-mod_wsgi-config
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+54140@code.launchpad.net

Commit message

Add a combo.wsgi file for running the combo server with mod_wsgi

Description of the change

Hi,

This branch adds a combo.wsgi file for running the combo server with mod_wsgi.

Cheers,
mwh

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) wrote :

Hi Michael:

37 +##SRC_DIR = pkg_resources.resource_filename(
38 +## pkg_resources.Requirement.parse("lazr-js"), "lazrjs")

Does this still need to be in the code?

Other than that, this is r=me.

review: Approve (code)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

On Tue, 22 Mar 2011 10:34:26 -0000, Graham Binns <email address hidden> wrote:
> Review: Approve code
> Hi Michael:
>
> 37 +##SRC_DIR = pkg_resources.resource_filename(
> 38 +## pkg_resources.Requirement.parse("lazr-js"), "lazrjs")
>
> Does this still need to be in the code?

No, clearly :-) Removing.

> Other than that, this is r=me.

Cool. Do I just land via PQM?, do you know?

Cheers,
mwh

210. By Michael Hudson-Doyle

remove commented out code

Revision history for this message
Graham Binns (gmb) wrote :

On 22 March 2011 18:46, Michael Hudson-Doyle <email address hidden> wrote:
> On Tue, 22 Mar 2011 10:34:26 -0000, Graham Binns <email address hidden> wrote:
>> Review: Approve code
>> Hi Michael:
>>
>> 37    +##SRC_DIR = pkg_resources.resource_filename(
>> 38    +##    pkg_resources.Requirement.parse("lazr-js"), "lazrjs")
>>
>> Does this still need to be in the code?
>
> No, clearly :-)  Removing.
>
>> Other than that, this is r=me.
>
> Cool.  Do I just land via PQM?, do you know?

Ffff. I *think* it's a PQM thing, yes. I've landed entirely one
lazr-js branch in the last six months, so I'm a bit rusty. Submit it
anyway and see what happens.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

OK, FTR lp-land worked :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'combo.wsgi'
2--- combo.wsgi 1970-01-01 00:00:00 +0000
3+++ combo.wsgi 2011-03-22 18:46:44 +0000
4@@ -0,0 +1,16 @@
5+import os
6+import site
7+import sys
8+
9+# If you have some lazr modules installed but lazr-js is not installed in a
10+# system location, the lazr 'namespace package' interferes with importing the
11+# lazr-js code.
12+sys.modules.pop('lazr', None)
13+
14+ROOT = os.path.dirname(__file__)
15+
16+sys.path.insert(0, os.path.join(ROOT, 'src-py'))
17+
18+from lazr.js.combo import combo_app
19+
20+application = combo_app(os.path.join(ROOT, "build"))
21
22=== modified file 'src-py/lazr/js/build.py'
23--- src-py/lazr/js/build.py 2011-01-10 14:36:00 +0000
24+++ src-py/lazr/js/build.py 2011-03-22 18:46:44 +0000
25@@ -13,12 +13,10 @@
26 from glob import glob
27
28 import cssutils
29-import pkg_resources
30
31 HERE = os.path.dirname(__file__)
32 BUILD_DIR = os.path.normpath(os.path.join(HERE, '..', '..', '..', 'build'))
33-SRC_DIR = pkg_resources.resource_filename(
34- pkg_resources.Requirement.parse("lazr-js"), "lazrjs")
35+SRC_DIR = os.path.normpath(os.path.join(HERE, '..', '..', '..'))
36
37 ESCAPE_STAR_PROPERTY_RE = re.compile(r'\*([a-zA-Z0-9_-]+):')
38 UNESCAPE_STAR_PROPERTY_RE = re.compile(r'([a-zA-Z0-9_-]+)_ie_star_hack:')

Subscribers

People subscribed via source and target branches