If I recall correctly, the solution I ended up with (which is
different from the one described in the thread above) requires that
lex.py and yacc.py from the PLY distribution be bundled with my
module.
I also rigged my setup.py to generate the lextab and parsetab files,
so that they can be compiled and the corresponding .pyc files are
installed by setup.py.
You're free to examine my code:
http://pywbem.svn.sourceforge.net/viewvc/pywbem/pywbem/trunk/mof_compiler.py?view=markup
http://pywbem.svn.sourceforge.net/viewvc/pywbem/pywbem/trunk/setup.py?view=markup
No. As I recall now, it works simply because I pulled lex.py and
yacc.py from ply and included them in the same directory as my code.
When the code within lex.py and yacc.py tries to import the parsetab
and lextab modules, it first looks in the same directory where lex.py
and yacc.py reside. It finds the modules there. so it doesn't
regenerate them.
If you don't want to do that, you'll have to do something like what is
discussed in this email thread, mentioned previously:
http://groups.google.com/group/ply-hack/browse_thread/thread/848eeedab7152f5b/8294806bafe22a57?pli=1
Sorry for the confusion.