From af3e11d86fc27942e290627a6375024283c1011e Mon Sep 17 00:00:00 2001 From: milahu Date: Sun, 3 Dec 2023 07:15:50 +0100 Subject: [PATCH] setup.py: import version --- setup.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/setup.py b/setup.py index aaba3a7..89d494c 100644 --- a/setup.py +++ b/setup.py @@ -17,19 +17,10 @@ import re from setuptools import setup +from undetected_chromedriver import __version__ as version dirname = os.path.abspath(os.path.dirname(__file__)) -with codecs.open( - os.path.join(dirname, "undetected_chromedriver", "__init__.py"), - mode="r", - encoding="utf-8", -) as fp: - try: - version = re.findall(r"^__version__ = ['\"]([^'\"]*)['\"]", fp.read(), re.M)[0] - except Exception: - raise RuntimeError("unable to determine version") - description = ( "Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.", "Not triggered by CloudFlare/Imperva/hCaptcha and such.",