Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Moved the stdlib to a dummy package so that it can be found using pkg…

…_resources.
  • Loading branch information...
commit 9fae9900b8f6467d12a364231aa96de9b83a2db1 1 parent 7ae5304
Derek Murray authored
2  MANIFEST.in
... ... @@ -1 +1 @@
1   -include src/sw/stdlib/*
  1 +include src/python/swi/stdlib/*
2  setup.py
@@ -7,7 +7,7 @@
7 7 author = "Derek Murray",
8 8 author_email = "Derek.Murray@cl.cam.ac.uk",
9 9 url = "http://www.cl.cam.ac.uk/netos/ciel/skywriting/",
10   - packages = [ 'swi' ],
  10 + packages = [ 'swi', 'swi.stdlib' ],
11 11 package_dir = { '' : 'src/python' },
12 12 entry_points = {'console_scripts' : ['skywriting=swi.interpreter:main', 'sw-job=swi.submit:main'],
13 13 'ciel.executor.plugin' : ['swi=swi.executor:load']},
2  src/python/swi/interpreter.py
@@ -17,7 +17,7 @@
17 17 import traceback
18 18
19 19 from swi.task import SkywritingTask
20   -from shared.rpc_helper import RpcHelper, ShutdownException
  20 +from ciel.public.rpc_helper import RpcHelper, ShutdownException
21 21
22 22 def main():
23 23
15 src/python/swi/stdlib/__init__.py
... ... @@ -0,0 +1,15 @@
  1 +# Copyright (c) 2010 Derek Murray <derek.murray@cl.cam.ac.uk>
  2 +#
  3 +# Permission to use, copy, modify, and distribute this software for any
  4 +# purpose with or without fee is hereby granted, provided that the above
  5 +# copyright notice and this permission notice appear in all copies.
  6 +#
  7 +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8 +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9 +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10 +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11 +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12 +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13 +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14 +
  15 +
0  src/sw/stdlib/environ → src/python/swi/stdlib/environ
File renamed without changes
0  src/sw/stdlib/grab → src/python/swi/stdlib/grab
File renamed without changes
0  src/sw/stdlib/java → src/python/swi/stdlib/java
File renamed without changes
0  src/sw/stdlib/mapreduce → src/python/swi/stdlib/mapreduce
File renamed without changes
0  src/sw/stdlib/stdinout → src/python/swi/stdlib/stdinout
File renamed without changes
0  src/sw/stdlib/sync → src/python/swi/stdlib/sync
File renamed without changes
7 src/python/swi/task.py
@@ -11,10 +11,10 @@
11 11 SWScriptParser
12 12 from swi.datatypes import map_leaf_values
13 13 from swi.parser import CloudScriptParser
14   -from shared.references import SWErrorReference, decode_datavalue_string,\
  14 +from ciel.public.references import SWErrorReference, decode_datavalue_string,\
15 15 SWReferenceJSONEncoder, json_decode_object_hook, SWRealReference,\
16 16 encode_datavalue
17   -from shared.io_helpers import MaybeFile
  17 +from ciel.public.io_helpers import MaybeFile
18 18
19 19 import simplejson
20 20 import pickle
@@ -239,7 +239,8 @@ def include_script(self, target_expr):
239 239 raise
240 240 else:
241 241 try:
242   - with open(resource_filename(Requirement.parse("ciel"), os.path.join("share/ciel/skywriting/stdlib/", target_expr)), "r") as fp:
  242 + print resource_filename(Requirement.parse("ciel-skywriting"), os.path.join("swi/stdlib/", target_expr))
  243 + with open(resource_filename(Requirement.parse("ciel-skywriting"), os.path.join("swi/stdlib/", target_expr)), "r") as fp:
243 244 script_str = fp.read()
244 245 except Exception as e:
245 246 print >>sys.stderr, "Include file failed:", repr(e)

0 comments on commit 9fae990

Please sign in to comment.
Something went wrong with that request. Please try again.