Here is our wrapper which worked with rbtools-0.2beta1-py2.6.egg, and
doesn't with 0.3.2

import os
import sys
import time

mydir = os.path.dirname(__file__)
os.environ['PATH'] += ";"+mydir
parentdir = os.path.dirname(mydir)
pkgs = os.path.join(parentdir, "Python26", "site-packages")
sys.path.append(pkgs)
import site
site.addsitedir(pkgs)


if len(sys.argv)<=1:
        changelist = raw_input("perforce changelist number: ")
        sys.argv.append(changelist)

sys.argv.extend(["--server=http://myreviewboard/";,  "--
username=genericuser",
                 "--password=genericuser", "--submit-
as="+os.environ["USERNAME"].lower()])

__requires__ = 'rbtools==0.3.2'
import pkg_resources
pkg_resources.run_script('rbtools==0.3.2', 'post-review')



On May 12, 12:06 pm, Christian Hammond <chip...@chipx86.com> wrote:
> It doesn't sound as if this is installed correctly. Post-review is
> actually a Python module with a thin wrapper script. It looks like
> that thin wrapper is what you have on \\share.
>
> What you can do is install RBTools into a custom PYTHONPATH on the
> share, and then provide a new, custom wrapper that invokes our wrapper
> with the python path set.
>
> Christian
>
>
>
>
>
> On Thursday, May 12, 2011, minkzanity <min...@gmail.com> wrote:
> > We are using RB 1.5.5 and RBTools 0.3.2 egg.
>
> > We are running into this error:
>
> > Traceback (most recent call last):
> >   File "\\share\post-review.py", line 24, in <module>
> >     pkg_resources.run_script('rbtools==0.3.2', 'post-review')
> >   File "C:\Python26\lib\site-packages\pkg_resources.py", line 489, in
> > run_script
> >     self.require(requires)[0].run_script(script_name, ns)
> >   File "C:\Python26\lib\site-packages\pkg_resources.py", line 1201, in
> > run_script
> >     raise ResolutionError("No script named %r" % script_name)
> > pkg_resources.ResolutionError: No script named 'post-review'
>
> > This script was working when we were using rbtools-0.2beta1.  If we
> > use egg 0.2beta1, it seems to resolve the script name, but it's
> > incompatibale with RB 1.5.5
>
> > Any ideas?
>
> > --
> > Want to help the Review Board project? Donate today 
> > athttp://www.reviewboard.org/donate/
> > Happy user? Let us know athttp://www.reviewboard.org/users/
> > -~----------~----~----~----~------~----~------~--~---
> > To unsubscribe from this group, send email to 
> > reviewboard+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/reviewboard?hl=en
>
> --
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.reviewboard.org
> VMware, Inc. -http://www.vmware.com- Hide quoted text -
>
> - Show quoted text -

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to