SeleniumBase/setup.py

318 lines
15 KiB
Python
Raw Normal View History

2015-12-05 05:11:53 +08:00
"""
2021-09-20 15:21:52 +08:00
The setup package to install SeleniumBase dependencies and plugins.
2019-07-14 12:53:51 +08:00
(Uses selenium 3.x and is compatible with Python 2.7+ and Python 3.5+)
2015-12-05 05:11:53 +08:00
"""
2021-05-11 07:18:44 +08:00
from setuptools import setup, find_packages # noqa: F401
import os
import sys
2018-08-28 10:21:10 +08:00
this_dir = os.path.abspath(os.path.dirname(__file__))
2018-08-28 10:21:10 +08:00
long_description = None
2020-05-18 13:21:24 +08:00
total_description = None
2018-08-28 10:21:10 +08:00
try:
2021-05-04 10:38:13 +08:00
with open(os.path.join(this_dir, "README.md"), "rb") as f:
total_description = f.read().decode("utf-8")
description_lines = total_description.split("\n")
2020-05-18 13:21:24 +08:00
long_description_lines = []
for line in description_lines:
if not line.startswith("<meta ") and not line.startswith("<link "):
long_description_lines.append(line)
long_description = "\n".join(long_description_lines)
2018-08-28 10:21:10 +08:00
except IOError:
2021-02-01 04:28:45 +08:00
long_description = "A complete library for building end-to-end tests."
about = {}
# Get the package version from the seleniumbase/__version__.py file
2021-05-04 10:38:13 +08:00
with open(os.path.join(this_dir, "seleniumbase", "__version__.py"), "rb") as f:
exec(f.read().decode("utf-8"), about)
2015-12-05 05:11:53 +08:00
2021-05-04 10:38:13 +08:00
if sys.argv[-1] == "publish":
reply = None
input_method = input
if not sys.version_info[0] >= 3:
2021-05-11 07:18:44 +08:00
input_method = raw_input # noqa: F821
2021-05-04 10:38:13 +08:00
confirm_text = ">>> Confirm release PUBLISH to PyPI? (yes/no): "
reply = str(input_method(confirm_text)).lower().strip()
if reply == "yes":
print("\n*** Checking code health with flake8:\n")
2021-10-12 05:31:56 +08:00
os.system("python -m pip install 'flake8==4.0.1'")
2021-09-20 15:21:52 +08:00
flake8_status = os.system("flake8 --exclude=recordings,temp")
if flake8_status != 0:
print("\nWARNING! Fix flake8 issues before publishing to PyPI!\n")
sys.exit()
else:
print("*** No flake8 issues detected. Continuing...")
2021-11-18 08:35:46 +08:00
print("\n*** Removing existing distribution packages: ***\n")
2021-05-04 10:38:13 +08:00
os.system("rm -f dist/*.egg; rm -f dist/*.tar.gz; rm -f dist/*.whl")
os.system("rm -rf build/bdist.*; rm -rf build/lib")
2021-11-18 08:35:46 +08:00
print("\n*** Installing build: *** (Required for PyPI uploads)\n")
os.system("python -m pip install --upgrade 'build>=0.7.0'")
print("\n*** Installing twine: *** (Required for PyPI uploads)\n")
2021-12-08 02:47:38 +08:00
os.system("python -m pip install --upgrade 'twine>=3.7.1'")
2020-05-03 10:47:59 +08:00
print("\n*** Installing tqdm: *** (Required for PyPI uploads)\n")
2021-09-22 02:02:38 +08:00
os.system("python -m pip install --upgrade 'tqdm>=4.62.3'")
2021-11-18 08:35:46 +08:00
print("\n*** Rebuilding distribution packages: ***\n")
os.system("python -m build") # Create new tar/wheel
print("\n*** Publishing The Release to PyPI: ***\n")
2021-05-04 10:38:13 +08:00
os.system("python -m twine upload dist/*") # Requires ~/.pypirc Keys
print("\n*** The Release was PUBLISHED SUCCESSFULLY to PyPI! :) ***\n")
else:
print("\n>>> The Release was NOT PUBLISHED to PyPI! <<<\n")
sys.exit()
2015-12-05 05:11:53 +08:00
setup(
2021-05-04 10:38:13 +08:00
name="seleniumbase",
version=about["__version__"],
description="A complete web automation framework for end-to-end testing.",
2018-08-28 10:21:10 +08:00
long_description=long_description,
2021-05-04 10:38:13 +08:00
long_description_content_type="text/markdown",
url="https://github.com/seleniumbase/SeleniumBase",
2021-05-01 06:13:38 +08:00
project_urls={
"Changelog": "https://github.com/seleniumbase/SeleniumBase/releases",
2021-05-04 10:38:13 +08:00
"Download": "https://pypi.org/project/seleniumbase/#files",
2021-05-01 06:13:38 +08:00
"Gitter": "https://gitter.im/seleniumbase/SeleniumBase",
"Slack": "https://app.slack.com/client/T0ABCRTNX/C01SM888REZ",
"Blog": "https://seleniumbase.com/",
"PyPI": "https://pypi.org/project/seleniumbase/",
2021-05-04 10:38:13 +08:00
"Source": "https://github.com/seleniumbase/SeleniumBase",
"Documentation": "https://seleniumbase.io/",
2021-05-01 06:13:38 +08:00
},
2020-05-03 10:30:18 +08:00
platforms=["Windows", "Linux", "Mac OS-X"],
2021-05-04 10:38:13 +08:00
author="Michael Mintz",
author_email="mdmintz@gmail.com",
maintainer="Michael Mintz",
2018-08-28 06:36:52 +08:00
license="MIT",
2022-01-09 09:30:43 +08:00
keywords="pytest automation selenium browser testing webdriver sbase",
2018-08-28 06:36:52 +08:00
classifiers=[
"Development Status :: 5 - Production/Stable",
2020-10-14 13:24:16 +08:00
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: Web Environment",
2020-05-03 10:30:18 +08:00
"Framework :: Pytest",
2019-06-26 15:31:45 +08:00
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
2020-05-03 10:30:18 +08:00
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
2018-08-28 06:36:52 +08:00
"Operating System :: Microsoft :: Windows",
2020-05-03 10:30:18 +08:00
"Operating System :: POSIX :: Linux",
2018-08-28 06:36:52 +08:00
"Programming Language :: Python",
2020-09-24 00:53:38 +08:00
"Programming Language :: Python :: 3",
2018-08-28 06:36:52 +08:00
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
2020-09-24 00:53:38 +08:00
"Programming Language :: Python :: 3.9",
2021-09-01 12:39:18 +08:00
"Programming Language :: Python :: 3.10",
2020-05-03 10:30:18 +08:00
"Topic :: Internet",
2021-12-24 05:07:15 +08:00
"Topic :: Internet :: WWW/HTTP :: Browsers",
2020-05-03 10:30:18 +08:00
"Topic :: Scientific/Engineering",
2022-01-12 11:41:50 +08:00
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Scientific/Engineering :: Visualization",
2020-05-03 10:30:18 +08:00
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
2022-01-12 11:41:50 +08:00
"Topic :: Software Development :: Code Generators",
2020-05-03 10:30:18 +08:00
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Utilities",
2018-08-28 06:36:52 +08:00
],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
install_requires=[
2021-01-24 15:53:53 +08:00
'pip>=20.3.4;python_version<"3.6"',
2021-10-23 04:25:55 +08:00
'pip>=21.3.1;python_version>="3.6"',
2021-07-06 22:31:03 +08:00
'packaging>=20.9;python_version<"3.6"',
2021-11-26 01:43:55 +08:00
'packaging>=21.3;python_version>="3.6"',
2020-06-16 10:18:45 +08:00
'setuptools>=44.1.1;python_version<"3.5"',
2020-12-07 13:48:47 +08:00
'setuptools>=50.3.2;python_version>="3.5" and python_version<"3.6"',
2021-12-24 05:18:12 +08:00
'setuptools>=59.6.0;python_version>="3.6" and python_version<"3.7"',
2022-01-20 12:21:40 +08:00
'setuptools>=60.5.0;python_version>="3.7"',
2021-11-16 02:54:18 +08:00
'setuptools-scm>=5.0.2;python_version<"3.6"',
2022-01-20 12:21:40 +08:00
'setuptools-scm>=6.4.2;python_version>="3.6"',
2021-12-14 10:42:07 +08:00
'tomli>=1.2.2;python_version>="3.6" and python_version<"3.7"',
'tomli>=2.0.0;python_version>="3.7"',
2021-12-24 05:07:15 +08:00
"wheel>=0.37.1",
2022-01-01 04:29:34 +08:00
"attrs>=21.4.0",
2021-10-14 15:15:34 +08:00
'PyYAML>=6.0;python_version>="3.6"',
2021-11-16 02:54:18 +08:00
'traitlets>=4.3.3;python_version<"3.7"',
2021-11-11 01:58:04 +08:00
'traitlets>=5.1.1;python_version>="3.7"',
2021-10-09 11:59:16 +08:00
"certifi>=2021.10.8",
2021-05-06 09:07:45 +08:00
"six==1.16.0",
2021-08-24 12:04:25 +08:00
'ipdb==0.13.4;python_version<"3.5"',
'ipdb==0.13.9;python_version>="3.5"',
'parso==0.7.1;python_version<"3.6"',
2021-12-02 13:09:21 +08:00
'parso==0.8.3;python_version>="3.6"',
'jedi==0.17.2;python_version<"3.6"',
2021-11-18 08:36:08 +08:00
'jedi==0.18.1;python_version>="3.6"',
'idna==2.10;python_version<"3.6"', # Must stay in sync with "requests"
2021-10-14 15:15:34 +08:00
'idna==3.3;python_version>="3.6"', # Must stay in sync with "requests"
2021-08-24 12:04:25 +08:00
'chardet==3.0.4;python_version<"3.5"', # Stay in sync with "requests"
'chardet==4.0.0;python_version>="3.5"', # Stay in sync with "requests"
2022-01-05 09:48:37 +08:00
'charset-normalizer==2.0.10;python_version>="3.5"', # Sync "requests"
2022-01-09 09:33:44 +08:00
"urllib3==1.26.8", # Must stay in sync with "requests"
2022-01-05 09:48:37 +08:00
'requests==2.27.0;python_version<"3.5"',
'requests==2.25.1;python_version>="3.5" and python_version<"3.6"',
2022-01-06 04:52:49 +08:00
'requests==2.27.1;python_version>="3.6"',
2021-11-16 02:54:18 +08:00
"nose==1.3.7",
'sniffio==1.2.0;python_version>="3.7"',
2022-01-20 12:21:40 +08:00
'h11==0.13.0;python_version>="3.7"',
2021-10-16 13:21:26 +08:00
'trio==0.19.0;python_version>="3.7"',
'trio-websocket==0.9.2;python_version>="3.7"',
'pyopenssl==21.0.0;python_version>="3.7"',
2021-11-16 02:54:18 +08:00
'wsproto==1.0.0;python_version>="3.7"',
'selenium==3.141.0;python_version<"3.7"',
2021-11-26 01:43:55 +08:00
'selenium==4.1.0;python_version>="3.7"',
'msedge-selenium-tools==3.141.3;python_version<"3.7"',
2020-08-30 09:38:36 +08:00
'more-itertools==5.0.0;python_version<"3.5"',
2021-11-26 01:43:55 +08:00
'more-itertools==8.12.0;python_version>="3.5"',
"cssselect==1.1.0",
2021-11-16 04:19:42 +08:00
"sortedcontainers==2.4.0",
2021-10-03 12:22:00 +08:00
'filelock==3.2.1;python_version<"3.6"',
2021-12-29 12:52:04 +08:00
'filelock==3.4.1;python_version>="3.6" and python_version<"3.7"',
'filelock==3.4.2;python_version>="3.7"',
2021-08-24 12:04:25 +08:00
'fasteners==0.16;python_version<"3.5"',
2022-01-20 12:21:40 +08:00
'fasteners==0.16.3;python_version>="3.5" and python_version<"3.6"',
2022-01-26 14:00:57 +08:00
'fasteners==0.17.3;python_version>="3.6"',
2021-06-18 23:52:43 +08:00
"execnet==1.9.0",
2021-09-01 12:39:18 +08:00
'pluggy==0.13.1;python_version<"3.6"',
'pluggy==1.0.0;python_version>="3.6"',
'py==1.8.1;python_version<"3.5"',
2021-11-06 08:12:24 +08:00
'py==1.11.0;python_version>="3.5"',
2020-06-08 10:30:44 +08:00
'pytest==4.6.11;python_version<"3.5"',
2020-12-18 14:26:20 +08:00
'pytest==6.1.2;python_version>="3.5" and python_version<"3.6"',
2021-09-01 12:39:18 +08:00
'pytest==6.2.5;python_version>="3.6"',
2021-12-12 05:15:37 +08:00
'pytest-forked==1.3.0;python_version<"3.6"',
'pytest-forked==1.4.0;python_version>="3.6"',
2019-11-29 13:38:05 +08:00
'pytest-html==1.22.1;python_version<"3.6"',
2021-09-28 03:08:03 +08:00
'pytest-html==2.0.1;python_version>="3.6"', # Newer ones had issues
2020-05-08 00:39:00 +08:00
'pytest-metadata==1.8.0;python_version<"3.6"',
2020-12-01 01:20:52 +08:00
'pytest-metadata==1.11.0;python_version>="3.6"',
"pytest-ordering==0.6",
'pytest-rerunfailures==8.0;python_version<"3.5"',
2021-06-05 09:55:27 +08:00
'pytest-rerunfailures==9.1.1;python_version>="3.5" and python_version<"3.6"', # noqa: E501
2021-09-20 15:21:52 +08:00
'pytest-rerunfailures==10.2;python_version>="3.6"',
2020-08-15 08:31:26 +08:00
'pytest-xdist==1.34.0;python_version<"3.5"',
2021-06-18 23:52:43 +08:00
'pytest-xdist==2.2.1;python_version>="3.5" and python_version<"3.6"',
2021-12-12 04:37:37 +08:00
'pytest-xdist==2.5.0;python_version>="3.6"',
"parameterized==0.8.1",
"sbvirtualdisplay==1.0.0",
2020-05-18 11:48:23 +08:00
'soupsieve==1.9.6;python_version<"3.5"',
2021-08-24 12:04:25 +08:00
'soupsieve==2.1;python_version>="3.5" and python_version<"3.6"',
2021-11-16 02:54:18 +08:00
'soupsieve==2.3.1;python_version>="3.6"',
2021-09-20 15:21:52 +08:00
'beautifulsoup4==4.9.3;python_version<"3.5"',
'beautifulsoup4==4.10.0;python_version>="3.5"',
2021-01-08 02:43:03 +08:00
'cryptography==2.9.2;python_version<"3.5"',
2021-08-24 12:04:25 +08:00
'cryptography==3.2.1;python_version>="3.5" and python_version<"3.6"',
2021-10-06 05:31:13 +08:00
'cryptography==3.4.8;python_version>="3.6" and python_version<"3.7"',
2021-12-17 17:38:56 +08:00
'cryptography==36.0.1;python_version>="3.7"',
2020-03-15 07:34:51 +08:00
'pygments==2.5.2;python_version<"3.5"',
2022-01-09 09:33:44 +08:00
'pygments==2.11.2;python_version>="3.5"',
2021-08-24 12:04:25 +08:00
'prompt-toolkit==1.0.18;python_version<"3.5"',
'prompt-toolkit==2.0.10;python_version>="3.5" and python_version<"3.6.2"', # noqa: E501
2021-12-12 04:37:37 +08:00
'prompt-toolkit==3.0.24;python_version>="3.6.2"',
2021-05-11 07:18:44 +08:00
'decorator==4.4.2;python_version<"3.5"',
2022-01-09 09:33:44 +08:00
'decorator==5.1.1;python_version>="3.5"',
2021-02-11 12:40:51 +08:00
'ipython==5.10.0;python_version<"3.5"',
2021-08-24 12:04:25 +08:00
'ipython==7.9.0;python_version>="3.5" and python_version<"3.6"',
'ipython==7.16.1;python_version>="3.6" and python_version<"3.7"',
2022-01-24 12:41:12 +08:00
'ipython==7.31.1;python_version>="3.7"', # Requires matplotlib-inline
2021-09-08 05:29:27 +08:00
'matplotlib-inline==0.1.3;python_version>="3.7"', # ipython needs this
"colorama==0.4.4",
2021-07-29 23:39:32 +08:00
'platformdirs==2.0.2;python_version<"3.6"',
2021-12-29 12:56:31 +08:00
'platformdirs==2.4.0;python_version>="3.6" and python_version<"3.7"',
'platformdirs==2.4.1;python_version>="3.7"',
2020-10-02 15:43:13 +08:00
'pathlib2==2.3.5;python_version<"3.5"', # Sync with "virtualenv"
2021-08-24 12:04:25 +08:00
'importlib-metadata==2.0.0;python_version<"3.5"',
'importlib-metadata==2.1.1;python_version>="3.5" and python_version<"3.6"', # noqa: E501
2022-01-03 08:13:04 +08:00
"virtualenv>=20.13.0", # Sync with importlib-metadata and pathlib2
2021-11-09 01:49:40 +08:00
"pycparser==2.21",
2021-01-08 02:43:03 +08:00
'pymysql==0.10.1;python_version<"3.6"',
2021-01-10 09:33:06 +08:00
'pymysql==1.0.2;python_version>="3.6"',
'pyotp==2.3.0;python_version<"3.5"',
'pyotp==2.6.0;python_version>="3.5"',
"boto==2.49.0",
2021-10-14 15:15:34 +08:00
"cffi==1.15.0",
"toml==0.10.2",
2020-11-28 04:03:53 +08:00
'Pillow==6.2.2;python_version<"3.5"',
'Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"',
2022-01-03 08:13:04 +08:00
'Pillow==8.4.0;python_version>="3.6" and python_version<"3.7"',
'Pillow==9.0.0;python_version>="3.7"',
2021-11-26 01:43:55 +08:00
'typing-extensions==3.10.0.2;python_version<"3.6"', # <3.8 for "rich"
'typing-extensions==4.0.0;python_version>="3.6" and python_version<"3.8"', # noqa: E501
2022-01-12 11:46:10 +08:00
'rich==11.0.0;python_version>="3.6" and python_version<"4.0"',
'tornado==5.1.1;python_version<"3.5"',
'tornado==6.1;python_version>="3.5"',
2020-01-05 07:57:49 +08:00
'pdfminer.six==20191110;python_version<"3.5"',
2021-10-14 15:15:34 +08:00
'pdfminer.six==20201018;python_version>="3.5" and python_version<"3.6"', # noqa: E501
'pdfminer.six==20211012;python_version>="3.6"',
2018-08-30 13:57:40 +08:00
],
extras_require={
# pip install -e .[coverage]
"coverage": [
2021-10-03 12:22:00 +08:00
'coverage==5.5;python_version<"3.6"',
2022-01-26 14:00:57 +08:00
'coverage==6.2;python_version>="3.6" and python_version<"3.7"',
'coverage==6.3;python_version>="3.7"',
2021-10-06 05:31:13 +08:00
'pytest-cov==2.12.1;python_version<"3.6"',
'pytest-cov==3.0.0;python_version>="3.6"',
],
# pip install -e .[flake]
"flake": [
'flake8==3.7.9;python_version<"3.5"',
2021-10-12 04:59:32 +08:00
'flake8==3.9.2;python_version>="3.5" and python_version<"3.6"',
'flake8==4.0.1;python_version>="3.6"',
2022-01-24 12:40:56 +08:00
'mccabe==0.6.1',
'pyflakes==2.1.1;python_version<"3.5"',
2021-10-12 05:17:40 +08:00
'pyflakes==2.3.1;python_version>="3.5" and python_version<"3.6"',
2021-10-12 05:20:30 +08:00
'pyflakes==2.4.0;python_version>="3.6"',
'pycodestyle==2.5.0;python_version<"3.5"',
2021-10-12 05:17:40 +08:00
'pycodestyle==2.7.0;python_version>="3.5" and python_version<"3.6"', # noqa: E501
'pycodestyle==2.8.0;python_version>="3.6"',
],
},
2018-08-30 13:57:40 +08:00
packages=[
"seleniumbase",
"sbase",
"seleniumbase.common",
"seleniumbase.config",
"seleniumbase.console_scripts",
"seleniumbase.core",
"seleniumbase.drivers",
"seleniumbase.extensions",
"seleniumbase.fixtures",
2021-09-20 15:21:52 +08:00
"seleniumbase.js_code",
"seleniumbase.masterqa",
"seleniumbase.plugins",
"seleniumbase.translate",
"seleniumbase.utilities",
"seleniumbase.utilities.selenium_grid",
"seleniumbase.utilities.selenium_ide",
2018-08-30 13:57:40 +08:00
],
include_package_data=True,
2015-12-05 05:11:53 +08:00
entry_points={
"console_scripts": [
"seleniumbase = seleniumbase.console_scripts.run:main",
"sbase = seleniumbase.console_scripts.run:main", # Simplified name
],
"nose.plugins": [
"base_plugin = seleniumbase.plugins.base_plugin:Base",
"selenium = seleniumbase.plugins.selenium_plugin:SeleniumBrowser",
"page_source = seleniumbase.plugins.page_source:PageSource",
"screen_shots = seleniumbase.plugins.screen_shots:ScreenShots",
"test_info = seleniumbase.plugins.basic_test_info:BasicTestInfo",
(
"db_reporting = "
"seleniumbase.plugins.db_reporting_plugin:DBReporting"
),
"s3_logging = seleniumbase.plugins.s3_logging_plugin:S3Logging",
2018-08-30 13:57:40 +08:00
],
"pytest11": ["seleniumbase = seleniumbase.plugins.pytest_plugin"],
},
2018-08-30 13:57:40 +08:00
)
2018-03-20 04:55:06 +08:00
# print(os.system("cat seleniumbase.egg-info/PKG-INFO"))
print("\n*** SeleniumBase Installation Complete! ***\n")