dynamic.py depends on DOM.py why? trouble with pyv8run of simple script

15 views
Skip to first unread message

Sarvi Shanmugham

unread,
Oct 24, 2013, 3:13:31 AM10/24/13
to pyjs-...@googlegroups.com

I've been trying to get pyv8run to execute a very simple test1.py script

def hello():
     return 2+3
print 'Hello World'

pyv8run test1.py works and prints 'Hello World'

But it seems to be compiling a lot of stuff unrelated to test1.py under output/lib
When I traced the dependencies, before it compiles test1.py it starts by tranlsating
builtins/pyjslib.py

This then depends on sys and dynamic.
pyjswidgets/dynamic depends on ['pyjamas.DOM', 'pyjamas', 'sys']
This then cascades into dependence on the rest of pyjamas.

From what I can tell the content of dynamic.py has nothing needed to compile test1.py and seems specific to web/widgets
This also causes a reverse dependency from pyjstools to pyjswidgets which shouldn't be there.

What should I do about it?

Sarvi

Sarvi Shanmugham

unread,
Oct 24, 2013, 1:18:12 PM10/24/13
to pyjs-...@googlegroups.com

Well the subject should have been why does pyjslib need to import dynamic
I removed the "import dynamic" from pyjslib and my test1.py comiled and ran no problem
This time without compiling any of the pyjamas stuff.

Interestingly I tried compiling the KitchSink.py and ran it from the web and everything ran fine without dynamic.

So where is dynamic.py used and where should I add its import without creating a dependency on pyjstools.
I could add it as an import into pyjamas/__init__.py. 
But before that where is used? I can't find where it is used and what it impacts

Sarvi
PS: I ran into this when trying to add closure compiler for deadcode removal
Reply all
Reply to author
Forward
0 new messages