SeleniumBase/setup.py

328 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.
2022-07-12 04:01:35 +08:00
(Uses selenium 3.x and is compatible with Python 2.7+ and Python 3.6+)
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")
2022-08-05 02:15:58 +08:00
os.system("python -m pip install 'flake8==5.0.4'")
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")
2022-08-02 05:57:17 +08:00
os.system("python -m pip install --upgrade 'build>=0.8.0'")
print("\n*** Installing twine: *** (Required for PyPI uploads)\n")
2022-06-01 23:24:34 +08:00
os.system("python -m pip install --upgrade 'twine>=4.0.1'")
2020-05-03 10:47:59 +08:00
print("\n*** Installing tqdm: *** (Required for PyPI uploads)\n")
2022-09-06 04:03:48 +08:00
os.system("python -m pip install --upgrade tqdm")
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.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",
2022-06-27 00:17:37 +08:00
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
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
],
2022-07-12 04:01:35 +08:00
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", # noqa: E501
install_requires=[
2021-01-24 15:53:53 +08:00
'pip>=20.3.4;python_version<"3.6"',
2022-02-01 14:03:43 +08:00
'pip>=21.3.1;python_version>="3.6" and python_version<"3.7"',
2022-08-05 02:15:05 +08:00
'pip>=22.2.2;python_version>="3.7"',
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"',
2022-07-12 04:01:35 +08:00
'setuptools>=44.1.1;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-09-30 09:56:44 +08:00
'setuptools>=65.4.1;python_version>="3.7"',
2022-02-06 12:05:45 +08:00
'tomli>=1.2.3;python_version>="3.6" and python_version<"3.7"',
2022-02-10 07:54:35 +08:00
'tomli>=2.0.1;python_version>="3.7"',
2022-09-06 04:03:48 +08:00
"tqdm>=4.64.1",
2021-12-24 05:07:15 +08:00
"wheel>=0.37.1",
2022-08-02 05:28:24 +08:00
'attrs>=21.4.0;python_version<"3.6"',
'attrs>=22.1.0;python_version>="3.6"',
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"',
2022-09-14 12:47:59 +08:00
'traitlets>=5.4.0;python_version>="3.7"',
2022-06-29 10:52:32 +08:00
'certifi>=2021.10.8;python_version<"3.6"',
2022-09-26 11:22:00 +08:00
'certifi>=2022.9.24;python_version>="3.6"',
'filelock>=3.2.1;python_version<"3.6"',
'filelock>=3.4.1;python_version>="3.6" and python_version<"3.7"',
2022-08-19 09:30:10 +08:00
'filelock>=3.8.0;python_version>="3.7"',
'platformdirs>=2.0.2;python_version<"3.6"',
'platformdirs>=2.4.0;python_version>="3.6" and python_version<"3.7"',
2022-04-20 05:31:59 +08:00
'platformdirs>=2.5.2;python_version>="3.7"',
2022-08-05 02:15:05 +08:00
'pyparsing>=2.4.7;python_version<"3.6"',
'pyparsing>=3.0.7;python_version>="3.6" and python_version<"3.7"',
'pyparsing>=3.0.9;python_version>="3.7"',
2021-05-06 09:07:45 +08:00
"six==1.16.0",
2022-07-12 04:01:35 +08:00
'ipdb==0.13.4;python_version<"3.6"',
'ipdb==0.13.9;python_version>="3.6"',
'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"
2022-09-14 12:47:59 +08:00
'idna==3.4;python_version>="3.6"', # Must stay in sync with "requests"
2022-07-12 04:01:35 +08:00
'chardet==3.0.4;python_version<"3.6"', # Stay in sync with "requests"
'chardet==4.0.0;python_version>="3.6" and python_version<"3.7"',
2022-07-01 02:08:17 +08:00
'chardet==5.0.0;python_version>="3.7"', # Stay in sync with "requests"
2022-07-12 04:01:35 +08:00
'charset-normalizer==2.0.12;python_version>="3.6" and python_version<"3.7"', # noqa: E501
2022-08-23 09:49:57 +08:00
'charset-normalizer==2.1.1;python_version>="3.7"', # Sync "requests"
'urllib3==1.26.12', # Stay in sync with "requests"
2022-07-12 04:01:35 +08:00
'requests==2.27.1;python_version<"3.7"',
2022-07-01 02:08:17 +08:00
'requests==2.28.1;python_version>="3.7"',
2021-11-16 02:54:18 +08:00
"nose==1.3.7",
2022-09-02 04:29:12 +08:00
'sniffio==1.3.0;python_version>="3.7"',
2022-09-26 11:22:00 +08:00
'h11==0.14.0;python_version>="3.7"',
2022-06-16 01:41:36 +08:00
'outcome==1.2.0;python_version>="3.7"',
2022-09-29 07:49:31 +08:00
'trio==0.22.0;python_version>="3.7"',
2021-10-16 13:21:26 +08:00
'trio-websocket==0.9.2;python_version>="3.7"',
2022-09-02 04:29:12 +08:00
'websockets==10.3;python_version>="3.7"',
2022-09-26 11:22:00 +08:00
'pyopenssl==22.1.0;python_version>="3.7"',
2022-08-24 09:15:12 +08:00
'wsproto==1.2.0;python_version>="3.7"',
2021-11-16 02:54:18 +08:00
'selenium==3.141.0;python_version<"3.7"',
2022-09-29 07:49:31 +08:00
'selenium==4.5.0;python_version>="3.7"',
'msedge-selenium-tools==3.141.3;python_version<"3.7"',
2022-07-12 04:01:35 +08:00
'more-itertools==5.0.0;python_version<"3.6"',
2022-08-19 09:30:10 +08:00
'more-itertools==8.14.0;python_version>="3.6"',
"cssselect==1.1.0",
2021-11-16 04:19:42 +08:00
"sortedcontainers==2.4.0",
2022-07-12 04:01:35 +08:00
'fasteners==0.16;python_version<"3.6"',
2022-09-15 01:56:51 +08:00
'fasteners==0.17.3;python_version>="3.6" and python_version<"3.7"',
'fasteners==0.18;python_version>="3.7"',
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"',
2022-07-12 04:01:35 +08:00
'py==1.8.1;python_version<"3.6"',
'py==1.11.0;python_version>="3.6"',
'pytest==4.6.11;python_version<"3.6"',
2022-03-16 09:44:16 +08:00
'pytest==7.0.1;python_version>="3.6" and python_version<"3.7"',
2022-09-06 04:03:48 +08:00
'pytest==7.1.3;python_version>="3.7"',
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"',
2022-03-23 03:36:35 +08:00
'pytest-metadata==1.11.0;python_version>="3.6" and python_version<"3.7"', # noqa: E501
'pytest-metadata==2.0.2;python_version>="3.7"',
"pytest-ordering==0.6",
2022-07-12 04:01:35 +08:00
'pytest-rerunfailures==8.0;python_version<"3.6"',
2021-09-20 15:21:52 +08:00
'pytest-rerunfailures==10.2;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'pytest-xdist==1.34.0;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",
2022-04-14 01:42:46 +08:00
"sbvirtualdisplay==1.1.0",
2022-05-14 06:18:28 +08:00
"behave==1.2.6",
"parse==1.19.0",
"parse-type==0.6.0",
2022-07-12 04:01:35 +08:00
'soupsieve==1.9.6;python_version<"3.6"',
2022-04-20 05:31:59 +08:00
'soupsieve==2.3.2.post1;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'beautifulsoup4==4.9.3;python_version<"3.6"',
2022-04-10 22:50:45 +08:00
'beautifulsoup4==4.11.1;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'cryptography==2.9.2;python_version<"3.6"',
2022-05-01 22:32:12 +08:00
'cryptography==36.0.2;python_version>="3.6" and python_version<"3.7"',
2022-09-14 12:47:59 +08:00
'cryptography==38.0.1;python_version>="3.7"',
2022-07-12 04:01:35 +08:00
'pygments==2.5.2;python_version<"3.6"',
2022-08-19 09:30:10 +08:00
'pygments==2.13.0;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'prompt-toolkit==1.0.18;python_version<"3.6"',
2022-09-06 04:03:48 +08:00
'prompt-toolkit==3.0.31;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'decorator==4.4.2;python_version<"3.6"',
'decorator==5.1.1;python_version>="3.6"',
'ipython==5.10.0;python_version<"3.6"',
'ipython==7.16.1;python_version>="3.6" and python_version<"3.7"',
2022-05-31 13:00:56 +08:00
'ipython==7.34.0;python_version>="3.7"', # Requires matplotlib-inline
2022-08-19 09:30:10 +08:00
'matplotlib-inline==0.1.6;python_version>="3.7"', # ipython needs this
2022-06-21 05:44:55 +08:00
"colorama==0.4.5",
2022-02-06 12:05:45 +08:00
'importlib-metadata==2.1.3;python_version<"3.6"',
2022-06-22 22:45:51 +08:00
'importlib-metadata==4.2.0;python_version>="3.6" and python_version<"3.8"', # noqa: E501
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"',
2022-07-12 04:01:35 +08:00
'pyotp==2.3.0;python_version<"3.6"',
2022-09-14 12:47:59 +08:00
'pyotp==2.7.0;python_version>="3.6"',
2022-07-01 03:23:27 +08:00
"cffi==1.15.1",
"toml==0.10.2",
2022-04-06 01:28:05 +08:00
'typing-extensions==3.10.0.2;python_version<"3.6"', # <3.9 for "rich"
2022-06-22 22:39:06 +08:00
'typing-extensions==4.1.1;python_version>="3.6" and python_version<"3.7"', # noqa: E501
'typing-extensions==4.2.0;python_version>="3.7" and python_version<"3.9"', # noqa: E501
2022-07-12 01:18:09 +08:00
'rich==12.5.1;python_version>="3.6" and python_version<"4.0"',
2018-08-30 13:57:40 +08:00
],
extras_require={
# pip install -e .[coverage]
2022-03-18 11:51:24 +08:00
# Usage: coverage run -m pytest; coverage html; coverage report
"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"',
2022-09-30 09:56:44 +08:00
'coverage==6.5.0;python_version>="3.7"',
2021-10-06 05:31:13 +08:00
'pytest-cov==2.12.1;python_version<"3.6"',
2022-09-29 07:49:31 +08:00
'pytest-cov==4.0.0;python_version>="3.6"',
],
# pip install -e .[flake]
2022-03-18 11:51:24 +08:00
# Usage: flake8
"flake": [
2022-07-12 04:01:35 +08:00
'flake8==3.7.9;python_version<"3.6"',
2022-08-05 02:15:58 +08:00
'flake8==5.0.4;python_version>="3.6"',
2022-08-02 05:39:44 +08:00
'mccabe==0.6.1;python_version<"3.6"',
'mccabe==0.7.0;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'pyflakes==2.1.1;python_version<"3.6"',
2022-08-02 05:29:59 +08:00
'pyflakes==2.5.0;python_version>="3.6"',
2022-07-12 04:01:35 +08:00
'pycodestyle==2.5.0;python_version<"3.6"',
2022-08-05 02:15:58 +08:00
'pycodestyle==2.9.1;python_version>="3.6"',
],
# pip install -e .[pdfminer]
"pdfminer": [
'pdfminer.six==20191110;python_version<"3.6"',
'pdfminer.six==20211012;python_version>="3.6" and python_version<"3.7"', # noqa: E501
'pdfminer.six==20220524;python_version>="3.7"',
],
# pip install -e .[pillow]
"pillow": [
'Pillow==6.2.2;python_version<"3.6"',
'Pillow==8.4.0;python_version>="3.6" and python_version<"3.7"',
'Pillow==9.2.0;python_version>="3.7"',
],
},
2018-08-30 13:57:40 +08:00
packages=[
"seleniumbase",
"sbase",
2022-05-14 06:17:25 +08:00
"seleniumbase.behave",
"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.resources",
"seleniumbase.translate",
2022-09-02 04:28:52 +08:00
"seleniumbase.undetected",
"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")