did a bit more hunting and found the issue. The bootstrap.py scripts now work.
Can some one try https://github.com/sarvi/pyjs/tree/pip-install and let me know if it meets their approval. What typical tests do you run? before you would think its solid? Sarvi On Sunday, October 13, 2013 1:31:32 AM UTC-7, Sarvi Shanmugham wrote: > > Need some help. > > I got the pip install and pip install -e (development mode) working after > the directory structure. > Or atleast I think its working. I had a simple helloworld program that it > seems to be compiling fine > > My problem and hence the help needed sign :) > I am trying to get the bin/scripts generated by the old bootstrap.py > script to also work like it used to. > > If I try to compile using the installed scripts in the virtual python > installation It atleast seems to work as shown below > localhost:tmpdir sarvi$ more test.py > def helloworld(): > print 'Hello World' > > helloworld() > > localhost:tmpdir sarvi$ rm -rf output/ > localhost:tmpdir sarvi$ ../lpython/bin/pyjsbuild test.py > Building: test > PYJSPATH: ['/Users/sarvi/Workspace/pyjs/tmpdir', > '/Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets', > '/Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswaddons'] > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/builtin/pyjslib.py > Translating file : /Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/lib/sys.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/dynamic.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/__init__.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/DOM.py > Translating file : /Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/lib/pyjd.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Window.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Location.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/__init__.py > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/Event.py > Translating file : /Users/sarvi/Workspace/pyjs/tmpdir/test.py > Translating file [ie6] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/DOM.py > Translating file [ie6] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Window.py > Translating file [ie6] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Location.py > Translating file [ie6] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/Event.py > Translating file [opera] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/DOM.py > Translating file [opera] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Window.py > Translating file [opera] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Location.py > Translating file [opera] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/Event.py > Translating file [oldmoz] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/DOM.py > Translating file [oldmoz] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Window.py > Translating file [oldmoz] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Location.py > Translating file [oldmoz] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/Event.py > Translating file [safari] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/DOM.py > Translating file [safari] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Window.py > Translating file [safari] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Location.py > Translating file [safari] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/Event.py > Translating file [mozilla] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/DOM.py > Translating file [mozilla] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Window.py > Translating file [mozilla] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/Location.py > Translating file [mozilla] : > /Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets/pyjamas/ui/Event.py > Built to : /Users/sarvi/Workspace/pyjs/tmpdir/output > localhost:tmpdir sarvi$ > > If on the other I tried the bin/pyjsbuild generated by the bootstrap.py I > get an error > localhost:tmpdir sarvi$ rm -rf output/ > localhost:tmpdir sarvi$ ../bin/pyjsbuild test.py > Building: test > PYJSPATH: ['/Users/sarvi/Workspace/pyjs/tmpdir', > '/Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswidgets', > '/Users/sarvi/Workspace/pyjs/pyjs-pyjamas/pyjswaddons'] > Translating file : > /Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/builtin/pyjslib.py > Traceback (most recent call last): > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/translator.py", line > 5, in <module> > import pyjs > ImportError: No module named pyjs > Traceback (most recent call last): > File "../bin/pyjsbuild", line 18, in <module> > pyjs.browser.build_script() > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/browser.py", line 524, > in build_script > runtime_options, args) > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/browser.py", line 448, > in build > l() > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/linker.py", line 260, > in __call__ > self.visit_modules([builtin_module], platform) > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/linker.py", line 316, > in visit_modules > self.visit_module(p, override_paths, platform, module_name=mn) > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/linker.py", line 369, > in visit_module > self.keep_lib_files) > File "/Users/sarvi/Workspace/pyjs/pyjs-tools/pyjs/linker.py", line 138, > in out_translate > raise translator.TranslationError('general fail in translator process') > pyjs.translator_proto.TranslationError: line Unknown: > general fail in translator process > > localhost:tmpdir sarvi$ > > I suspect this is not a standard python error because I am clearly setting > sys.path so that pyjs should be importable. > Infact I added debugs and dropped into debugger to make sure that "import > pyjs" in translator.py actuall works and it does. > > Yet I see the ImportError for pyjs. > > Everything untils this point has been commited and pushed to > https://github.com/sarvi/pyjs/tree/pip-install > so you should be able to pull and try what I am doing. > > Also, you could try how the pip install and pip install -e works with this > new structure and if people are comfortable I skip fixing the bootstrap.py > all together. > > Thx, > Sarvi > > On Saturday, October 12, 2013 6:08:49 PM UTC-7, Lex Berezhny wrote: >> >> It's much better than what was. >> >> Now it's a matter of getting it all working ;-) >> >> - lex >> >> >> On Sat, Oct 12, 2013 at 9:03 PM, Sarvi Shanmugham <sarv...@gmail.com>wrote: >> >>> update https://github.com/sarvi/pyjs/tree/pip-install with directory >>> structures changes based on Lex and Antony's feedback. >>> >>> Let me know how it looks. >>> >>> Sarvi >>> >>> >>> On Saturday, October 12, 2013 5:49:03 PM UTC-7, Sarvi Shanmugham wrote: >>>> >>>> I was looking for standard python directory structure convention and >>>> found many with python projects >>>> with sources organized under src/ and from what I see its still under >>>> debate per the following link >>>> >>>> http://stackoverflow.com/**questions/193161/what-is-the-** >>>> best-project-structure-for-a-**python-application<http://stackoverflow.com/questions/193161/what-is-the-best-project-structure-for-a-python-application> >>>> >>>> But also found the following which apparently comes from the python >>>> list and suggest src/ as a don't >>>> >>>> http://as.ynchrono.us/2007/12/**filesystem-structure-of-** >>>> python-project_21.html<http://as.ynchrono.us/2007/12/filesystem-structure-of-python-project_21.html> >>>> >>>> So I will eliminate the src/ directory >>>> >>>> Srvi >>>> >>>> On Saturday, October 12, 2013 5:10:12 PM UTC-7, Lex Berezhny wrote: >>>>> >>>>> I still don't understand what the deal is with the "src" directory. >>>>> That's really non-standard and makes no sense to me. >>>>> >>>>> Take a look at many of the major Python projects: Django, Twisted, >>>>> Flask, wxPython, pyGTK... all of them follow the same project structure >>>>> and >>>>> none of them have "src" directories. >>>>> >>>>> It's almost always like this: >>>>> >>>>> project/ >>>>> project/ >>>>> *modules* >>>>> tests/ >>>>> setup.py >>>>> >>>>> >>>>> >>>>> - lex >>>>> >>>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Pyjs.org Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to pyjs-users+...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- --- You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.