authomatic / chromedriver_installer

ChromeDriver installer for Python
15 stars 34 forks source link

New Chromedriver version Regexp verification error #11

Open Peresh opened 5 years ago

Peresh commented 5 years ago

After ChromeDriver copy the version pattern from Chrome, run install with new chromedriver version will get regexp error:

pip install chromedriver_installer --upgrade --force-reinstall --install-option="--chromedriver-version=73.0.3683.68"

Log: `python3.7/site-packages/pip/_internal/commands/install.py:207: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options. cmdoptions.check_install_build_global(options) Collecting chromedriver_installer Using cached https://files.pythonhosted.org/packages/c8/01/0a8a725bb605f68923aba16099a01cbbfe547c8b7dc96fd9a554424f6524/chromedriver_installer-0.0.6.tar.gz Skipping bdist_wheel for chromedriver-installer, due to binaries being disabled for it. Installing collected packages: chromedriver-installer Found existing installation: chromedriver-installer 0.0.6 Uninstalling chromedriver-installer-0.0.6: Successfully uninstalled chromedriver-installer-0.0.6 Running setup.py install for chromedriver-installer ... error Complete output from command /Users/peresh/.local/share/virtualenvs/Static-iTester-_9S97GHa/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/29/d_qvpc592hg470n29c3v5y5h0000gn/T/pip-install-afnb8phj/chromedriver-installer/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/29/d_qvpc592hg470n29c3v5y5h0000gn/T/pip-record-zvzfefqb/install-record.txt --single-version-externally-managed --compile --install-headers /Users/peresh/.local/share/virtualenvs/Static-iTester-_9S97GHa/bin/../include/site/python3.7/chromedriver-installer --chromedriver-version=73.0.3683.68: running install Traceback (most recent call last): File "", line 1, in File "/private/var/folders/29/d_qvpc592hg470n29c3v5y5h0000gn/T/pip-install-afnb8phj/chromedriver-installer/setup.py", line 220, in cmdclass=dict(build_scripts=BuildScripts, install=Install) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/29/d_qvpc592hg470n29c3v5y5h0000gn/T/pip-install-afnb8phj/chromedriver-installer/setup.py", line 182, in run CHROMEDRIVER_VERSION_PATTERN.pattern)) Exception: Invalid --chromedriver-version=73.0.3683.68! Must match /^\d+.\d+$/

jlane9 commented 5 years ago

https://github.com/authomatic/chromedriver_installer/blob/34ba37fdb5e0e0b3d210f3b03218b2c71049963d/setup.py#L26

Change to instead?

CHROMEDRIVER_VERSION_PATTERN = re.compile(r'^(?:\d+\.){1,3}\d+$')