Created
February 20, 2010 02:20
-
-
Save winhamwr/309449 to your computer and use it in GitHub Desktop.
fabric stub for getting selenium 2 python bindings to install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _install_webdriver(venv_path): | |
""" | |
Install/build the python webdriver client. The setup.py is busted, so we have | |
to do extra work beyond the virtualenv. | |
See: http://groups.google.com/group/webdriver/browse_thread/thread/f5c3484ab5ae5800/fdae02fa223d00b0 | |
""" | |
webdriver_dir = os.path.join(venv_path, 'src', 'webdriver') | |
py_bin = os.path.join(venv_path, 'bin', 'python') | |
with cd(webdriver_dir): | |
# Build webdriver | |
run('rake firefox_xpi') | |
run('%s setup.py build' % py_bin) | |
run('mkdir build/lib/webdriver/build_artifacts') | |
run('cp build/webdriver-extension.zip build/lib/webdriver/build_artifacts/') | |
# Install the webdriver client to the virtualenv | |
run('deactivate ; source %s && add2virtualenv %s' % ( | |
os.path.join(venv_path, 'bin/activate'), | |
os.path.join(venv_path, 'src/webdriver/build/lib')), pty=True) | |
sudo('chown -R hudson:policystat %s' % webdriver_dir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment