I started with the stack trace.. in particular the lines:
File "/usr/lib/python2.6/site-packages/modwsgideploy/commands.py",
line 100, in command
plugins= os.path.splitext(os.path.basename(egg_info_dir))[0]
It looks like os.path.basename doesn't expect egg_info_dir to be None,
it just assumes it to be a str (or something with a bound rfind method).
By looking in commands.py, I found that egg_info_dir gets assigned in
the preceding line with:
from paste.script import pluginlib
...
egg_info_dir = pluginlib.find_egg_info_dir(os.getcwd())
I followed the trail. pluginlib lives in
/usr/lib/python2.6/site-packages/paste/script/pluginlib.py
Here I'll quote the whole definition of find_egg_info_dir(...):
def find_egg_info_dir(dir):
while 1:
try:
filenames = os.listdir(dir)
except OSError:
# Probably permission denied or something
return None
for fn in filenames:
if fn.endswith('.egg-info'):
return os.path.join(dir, fn)
parent = os.path.dirname(dir)
if parent == dir:
# Top-most directory
return None
dir = parent
It looks like its returning None because it can't find a file
that ends with .egg-info! After a google or two, I found you
can generate that (if you don't still have it from your quickstart)
with:
python setup.py sdist
And that fixed it for me.
-RJ Bean
I have virtualenvs in two places:
/usr/local/pythonenv/BASELINE
/usr/local/pythonenv/myapp
I keep my project in git, so I also clone it to
/usr/local/turbogears/myapp
So, after having done the above (and setting bzr branching
modwsgideploy, python setup.py develop'ing it, etc), I did:
1 $ source /usr/local/pythonenv/myapp/bin/activate
2 $ cd /usr/local/turbogears/myapp
3 $ python setup.py develop
4 $ paster modwsgi_deploy --logging
Line 3 should create a myapp.egg-info folder at:
/usr/local/turbogears/myapp/myapp.egg-info
I found some info on .egg-info folders here
http://peak.telecommunity.com/DevCenter/EggFormats
In short, they contain metadata about your project that presumably
modwsgi_deploy uses to write your apache configuration.
> --
> You received this message because you are subscribed to the Google Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
>
--
RJ Bean