commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r1032242 - in /commons/sandbox/gsoc/2010/scxml-js/trunk: setup.py src/python/scxml/cgf/SCXMLCompiler.py src/python/setup.py src/python/test.py
Date Sun, 07 Nov 2010 09:37:45 GMT
Author: jbeard
Date: Sun Nov  7 09:37:44 2010
New Revision: 1032242

URL: http://svn.apache.org/viewvc?rev=1032242&view=rev
Log:
Moved setup.py. Created test.py script to test it. Compilation using packed egg now works
well.

Added:
    commons/sandbox/gsoc/2010/scxml-js/trunk/setup.py   (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/test.py   (with props)
Removed:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/setup.py
Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/setup.py
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/setup.py?rev=1032242&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/setup.py (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/setup.py Sun Nov  7 09:37:44 2010
@@ -0,0 +1,10 @@
+from setuptools import setup, find_packages
+
+setup(
+    name = "scxml-js",
+    version = "0.1a",
+    packages = find_packages("src/python"),
+    package_dir = {"":"src/python"},
+    package_data = { 'scxml.cgf': ['target/*.xsl','xslt/ir-compiler/*.xsl','xslt/layout/*.xsl']
}
+
+)

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/setup.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py?rev=1032242&r1=1032241&r2=1032242&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py Sun Nov
 7 09:37:44 2010
@@ -32,11 +32,11 @@ def compile(pathsToSCXML=[],backend="sta
 def transformDocument(sourceDocument=None,transformList=[],params={},output="xml"):
 
 	templateStreams = map(lambda t : pkg_resources.resource_stream(__name__,t), transformList)
-	print templateStreams 
+	#print templateStreams 
 	templateDocs = map(lambda t : etree.parse(t), templateStreams)
-	print templateDocs 
+	#print templateDocs 
 	compiledTemplates = map(lambda t : etree.XSLT(t), templateDocs)
-	print compiledTemplates 
+	#print compiledTemplates 
 
 	#TODO: apply args to the transform
 	outputDocument = reduce(lambda docToTransform,transform: transform(docToTransform), compiledTemplates,
sourceDocument)
@@ -61,8 +61,8 @@ def optlistToDict(optlist):
 def main(argv):
 	#parse command-line args
 	optlist, args = getopt.getopt(argv, '', ["backend=", "ie","noIndexOf","beautify","log","verbose","genListenerHooks"])
-	print "opts: ", optlist
-	print "args: ", args
+	#print "opts: ", optlist
+	#print "args: ", args
 	opts = optlistToDict(optlist)
 	results = compile(args,opts["--backend"],opts) 
 

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/test.py
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/test.py?rev=1032242&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/test.py (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/test.py Sun Nov  7 09:37:44 2010
@@ -0,0 +1,4 @@
+from scxml.cgf.SCXMLCompiler import compile
+
+results = compile(["../../test/kitchen_sink/KitchenSink.xml"])
+print results[0]

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/test.py
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message