leonidessaguisagjr / webdriverdownloader

Python module to facilitate downloading and deploying WebDriver binaries. Currently supporting geckodriver, chromedriver and operachromiumdriver.
https://pypi.org/project/webdriverdownloader/
MIT License
20 stars 17 forks source link

If venv is activate, choose install location accordingly. #1

Closed rasjani closed 6 years ago

rasjani commented 6 years ago

When running things in CI environments, one might not have access to write things outside of the workspace so quite often people resort to virtualenv. When venv is activated, there's VIRTUAL_ENV environment variable which tells the base path where things can be installed. If that variable is set (eg, venv is active), this patch uses that directory to download the webdriver and install the binary/link into correct location within the provided virtual env. Covers also windows side but its untested atm as i dont have access to windows box. Venv in windows doesnt install executables to "bin" but to "Scripts" folder ..