Re: lingwo-flashcards

0 views
Skip to first unread message

David Snopek

unread,
May 22, 2008, 10:56:56 AM5/22/08
to lingwo...@googlegroups.com, nep
Nick,

I'm moving this thread to lingwo...@googlegroups.com (you
subscribed there but under a different e-mail address, so I CC:'d you
too).

Anyway, it turns out that I left some steps out of the hacking
document. The changes are in the "Requirements" section (I completely
forgot about dojo) and the new "Preparing the Source" section:

http://www.lingwo.org/wiki/Hacking_Lingwo.flashcards

The one that bit you was the "python setup.py egg_info".

I did another end-to-end test and so this *should* be everything this
time, but please let me know if you have any problems.

Thank you,
David.

---------- Forwarded message ----------
From: nep <n...@noisetu.be>
Date: Wed, May 21, 2008 at 9:22 PM
Subject: lingwo-flashcards
To: dsn...@gmail.com


I have no idea what any of this means
[09:14PM][nep@gameshare-lm]~/Documents/Code/Python/memorati/src/server
$ paster setup-app standalone.ini
Traceback (most recent call last):
File "/usr/local/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.3.6', 'console_scripts', 'paster')()
File "/Library/Python/2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/script/command.py",
line 78, in run
invoke(command, command_name, options, args[1:])
File "/Library/Python/2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/script/command.py",
line 117, in invoke
exit_code = runner.run(args)
File "/Library/Python/2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/script/appinstall.py",
line 68, in run
return super(AbstractInstallCommand, self).run(new_args)
File "/Library/Python/2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/script/command.py",
line 212, in run
result = self.command()
File "/Library/Python/2.5/site-packages/PasteScript-1.3.6-py2.5.egg/paste/script/appinstall.py",
line 447, in command
conf = appconfig(config_spec, relative_to=os.getcwd())
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 204, in appconfig
global_conf=global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 237, in loadcontext
global_conf=global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 267, in _loadconfig
return loader.get_context(object_type, name, global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 393, in get_context
section)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 415, in _context_from_use
object_type, name=use, global_conf=global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 345, in get_context
global_conf=global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 237, in loadcontext
global_conf=global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 274, in _loadegg
return loader.get_context(object_type, name, global_conf)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 542, in get_context
object_type, name=name)
File "/Library/Python/2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy/loadwsgi.py",
line 562, in find_egg_entry_point
pkg_resources.require(self.spec)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py",
line 620, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py",
line 518, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: lingwo-flashcards


--
n...@noisetu.be

--
Open Source Hacker and Language Learner
http://www.hackyourlife.org/

Nick Purvis

unread,
May 22, 2008, 4:14:38 PM5/22/08
to The Lingwo Project
ALMOST WORKING! I've grabbed the latest stuff from bzr, but there
seems to be some inconsistency with the URLs in the js includes, here
are the 404s as reported by firebug:

http://127.0.0.1:5001/js/lingwo_flashcards/src/_base.js
http://127.0.0.1:5001/js/lingwo_flashcards/src/widgets.js
http://127.0.0.1:5001/js/lingwo_flashcards/src/standard.js
http://127.0.0.1:5001/js/lingwo_flashcards/src/app.js
http://127.0.0.1:5001/js/lingwo_flashcards/src/data.js

So, I tried to shuffle the symlinks around a bit:
..server/lingwo_flashcards/public/js $ rm lingwo_flashcards
..server/lingwo_flashcards/public/js $ mkdir lingwo_flashcards..server/
lingwo_flashcards/public/js $ cd lingwo_flashcards/
..server/lingwo_flashcards/public/js/lingwo_flashcards $ ln -
s ../../../../../javascript/lingwo_flashcards.css
lingwo_flashcards.css
..server/lingwo_flashcards/public/js/lingwo_flashcards $ ln -
s ../../../../../javascript/Lingwo.flashcards/ src

Now the 404 has moved elsewhere:
http://127.0.0.1:5001/js/lingwo_flashcards/Lingwo.flashcards/data.js
(I get 2 of these)

One more symlink and everything works great:
..server/lingwo_flashcards/public/js/lingwo_flashcards $ ln -
s ../../../../../javascript/Lingwo.flashcards Lingwo.flashcards

David Snopek

unread,
May 23, 2008, 9:20:19 AM5/23/08
to lingwo...@googlegroups.com
On Thu, May 22, 2008 at 3:14 PM, Nick Purvis <sub...@gmail.com> wrote:
>
> ALMOST WORKING! I've grabbed the latest stuff from bzr, but there
> seems to be some inconsistency with the URLs in the js includes, here
> are the 404s as reported by firebug:
>
> http://127.0.0.1:5001/js/lingwo_flashcards/src/_base.js
> http://127.0.0.1:5001/js/lingwo_flashcards/src/widgets.js
> http://127.0.0.1:5001/js/lingwo_flashcards/src/standard.js
> http://127.0.0.1:5001/js/lingwo_flashcards/src/app.js
> http://127.0.0.1:5001/js/lingwo_flashcards/src/data.js

Ah, these were debug <script ../> tags that were modified incorrectly
in the name change. But I think the 404s should have been harmless,
because the Dojo loader got the name change correct (ie. "src" ->
"Lingwo.flashcards").

So... I've removed those <script/> tags and decided to commit the
"lingwo_flashcards" symlink to bzr. Originally, I was avoiding
committing the symlink because it won't work under Windows, but we'll
need Windows specific instructions anyway, so this shouldn't mess
things up too bad.

Can you check out the latest from bzr and see if its better
out-of-the-box? (Just a warning: the Launchpad mirror won't be
updated for 4-5 hours, so you may have to check out from the branch
directly to get the changes -- infos added to the wiki.) Look out for
a conflict between the symlink and the directory you made.

Also, I know that you dealt with a bunch of MacOS specific problems in
getting this setup (ie. Python-MySQL, simplejson). It would be
awesome if you could throw some of that in the Wiki or just give a
quick summary here so I can drop it in.

Thanks again for the testing! I really appreciate it.

- David.

> So, I tried to shuffle the symlinks around a bit:
>
> ..server/lingwo_flashcards/public/js $
>
> rm lingwo_flashcards

> mkdir lingwo_flashcards
> cd lingwo_flashcards/
> ln -s ../../../../../javascript/lingwo_flashcards.css lingwo_flashcards.css
> ln -s ../../../../../javascript/Lingwo.flashcards/ src


>
> Now the 404 has moved elsewhere:
> http://127.0.0.1:5001/js/lingwo_flashcards/Lingwo.flashcards/data.js
> (I get 2 of these)
>
> One more symlink and everything works great:
> ..server/lingwo_flashcards/public/js/lingwo_flashcards $
>

> ln -s ../../../../../javascript/Lingwo.flashcards Lingwo.flashcards

Nick Purvis

unread,
May 23, 2008, 2:54:32 PM5/23/08
to The Lingwo Project
On May 23, 8:20 am, "David Snopek" <dsno...@gmail.com> wrote:
> Can you check out the latest from bzr and see if its better
> out-of-the-box? (Just a warning: the Launchpad mirror won't be
> updated for 4-5 hours, so you may have to check out from the branch
> directly to get the changes -- infos added to the wiki.) Look out for
> a conflict between the symlink and the directory you made.

Just tried this, worked perfectly! I moved the whole project directory
out of the way and started from scratch, skipping only the various
python installs/db setup steps.

> Also, I know that you dealt with a bunch of MacOS specific problems in
> getting this setup (ie. Python-MySQL, simplejson). It would be
> awesome if you could throw some of that in the Wiki or just give a
> quick summary here so I can drop it in.

My initial problems were due to gcc being hosed, most likely from my
upgrade to OSX 10.5. The solution to this, and in hindsight the first
thing I should have tried: Install the latest version of Xcode.

Once I had a working compiler, the only real problem I encountered was
with MySQL-python. I applied the following patch and that was that:
http://sourceforge.net/tracker/index.php?func=detail&aid=1808476&group_id=22307&atid=374932
I added this link to the "Hacking Lingwo.flashcards" talk page as
well: http://www.lingwo.org/node/8/talk

David Snopek

unread,
May 23, 2008, 3:09:48 PM5/23/08
to lingwo...@googlegroups.com
On Fri, May 23, 2008 at 1:54 PM, Nick Purvis <sub...@gmail.com> wrote:
> On May 23, 8:20 am, "David Snopek" <dsno...@gmail.com> wrote:
>> Can you check out the latest from bzr and see if its better
>> out-of-the-box? (Just a warning: the Launchpad mirror won't be
>> updated for 4-5 hours, so you may have to check out from the branch
>> directly to get the changes -- infos added to the wiki.) Look out for
>> a conflict between the symlink and the directory you made.
>
> Just tried this, worked perfectly! I moved the whole project directory
> out of the way and started from scratch, skipping only the various
> python installs/db setup steps.

Awesome!

>> Also, I know that you dealt with a bunch of MacOS specific problems in
>> getting this setup (ie. Python-MySQL, simplejson). It would be
>> awesome if you could throw some of that in the Wiki or just give a
>> quick summary here so I can drop it in.
>
> My initial problems were due to gcc being hosed, most likely from my
> upgrade to OSX 10.5. The solution to this, and in hindsight the first
> thing I should have tried: Install the latest version of Xcode.
>
> Once I had a working compiler, the only real problem I encountered was
> with MySQL-python. I applied the following patch and that was that:
> http://sourceforge.net/tracker/index.php?func=detail&aid=1808476&group_id=22307&atid=374932
> I added this link to the "Hacking Lingwo.flashcards" talk page as
> well: http://www.lingwo.org/node/8/talk

Cool, thanks!

Reply all
Reply to author
Forward
0 new messages