setup.py: import version
This commit is contained in:
parent
783b839315
commit
af3e11d86f
11
setup.py
11
setup.py
|
@ -17,19 +17,10 @@ import re
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
from undetected_chromedriver import __version__ as version
|
||||||
|
|
||||||
dirname = os.path.abspath(os.path.dirname(__file__))
|
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 = (
|
description = (
|
||||||
"Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.",
|
"Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.",
|
||||||
"Not triggered by CloudFlare/Imperva/hCaptcha and such.",
|
"Not triggered by CloudFlare/Imperva/hCaptcha and such.",
|
||||||
|
|
Loading…
Reference in New Issue