SeleniumBase/setup.py

263 lines
11 KiB
Python
Raw Normal View History

2015-12-05 05:11:53 +08:00
"""
2016-07-24 06:51:59 +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
"""
from setuptools import setup, find_packages # noqa
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:
input_method = raw_input # noqa
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-04-16 14:50:49 +08:00
os.system("python -m pip install 'flake8==3.9.1'")
flake8_status = os.system("flake8 --exclude=temp")
if flake8_status != 0:
print("\nWARNING! Fix flake8 issues before publishing to PyPI!\n")
sys.exit()
else:
print("*** No flake8 issues detected. Continuing...")
print("\n*** Rebuilding 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")
os.system("python setup.py sdist bdist_wheel") # Create new tar/wheel
print("\n*** Installing twine: *** (Required for PyPI uploads)\n")
2020-07-20 02:19:05 +08:00
os.system("python -m pip install --upgrade 'twine>=1.15.0'")
2020-05-03 10:47:59 +08:00
print("\n*** Installing tqdm: *** (Required for PyPI uploads)\n")
2021-04-06 10:39:32 +08:00
os.system("python -m pip install --upgrade 'tqdm>=4.60.0'")
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",
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",
2020-05-03 10:30:18 +08:00
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"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"',
'pip>=21.1.1;python_version>="3.6"',
"packaging>=20.9",
"typing-extensions>=3.10.0.0",
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-05-06 09:07:45 +08:00
'setuptools>=56.1.0;python_version>="3.6"',
2021-03-18 11:10:42 +08:00
'setuptools-scm==5.0.2;python_version<"3.6"',
2021-03-18 10:49:36 +08:00
'setuptools-scm>=6.0.1;python_version>="3.6"',
"wheel>=0.36.2",
"attrs>=20.3.0",
2021-01-21 13:39:12 +08:00
'PyYAML>=5.4.1;python_version>="3.6"',
"certifi>=2020.12.5",
2021-05-06 09:07:45 +08:00
"six==1.16.0",
"nose==1.3.7",
2021-03-03 12:10:26 +08:00
'ipdb==0.13.4;python_version<"3.6"',
2021-03-17 06:14:36 +08:00
'ipdb==0.13.7;python_version>="3.6"',
'parso==0.7.1;python_version<"3.6"',
2021-04-03 10:47:24 +08:00
'parso==0.8.2;python_version>="3.6"',
'jedi==0.17.2;python_version<"3.6"',
'jedi==0.18.0;python_version>="3.6"',
"idna==2.10", # Must stay in sync with "requests"
2020-12-18 14:26:20 +08:00
'chardet==3.0.4;python_version<"3.6"', # Stay in sync with "requests"
'chardet==4.0.0;python_version>="3.6"', # Stay in sync with "requests"
"urllib3==1.26.4", # Must stay in sync with "requests"
"requests==2.25.1",
"selenium==3.141.0",
"msedge-selenium-tools==3.141.3",
2020-08-30 09:38:36 +08:00
'more-itertools==5.0.0;python_version<"3.5"',
2021-02-11 12:32:41 +08:00
'more-itertools==8.7.0;python_version>="3.5"',
"cssselect==1.1.0",
"filelock==3.0.12",
"fasteners==0.16",
"pluggy==0.13.1",
'py==1.8.1;python_version<"3.5"',
2020-12-18 14:26:20 +08:00
'py==1.10.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-05-06 09:07:45 +08:00
'pytest==6.2.4;python_version>="3.6"',
"pytest-forked==1.3.0",
2019-11-29 13:38:05 +08:00
'pytest-html==1.22.1;python_version<"3.6"',
'pytest-html==2.0.1;python_version>="3.6"',
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"',
'pytest-rerunfailures==9.1.1;python_version>="3.5"',
2020-08-15 08:31:26 +08:00
'pytest-xdist==1.34.0;python_version<"3.5"',
2021-02-11 12:32:41 +08:00
'pytest-xdist==2.2.1;python_version>="3.5"',
"parameterized==0.8.1",
2020-05-18 11:48:23 +08:00
'soupsieve==1.9.6;python_version<"3.5"',
2020-12-18 14:26:20 +08:00
'soupsieve==2.0.1;python_version>="3.5" and python_version<"3.6"',
2021-03-23 14:48:14 +08:00
'soupsieve==2.2.1;python_version>="3.6"',
"beautifulsoup4==4.9.3",
2021-01-08 02:43:03 +08:00
'cryptography==2.9.2;python_version<"3.5"',
'cryptography==3.0;python_version>="3.5" and python_version<"3.6"',
2021-02-11 12:32:41 +08:00
'cryptography==3.3.2;python_version>="3.6"',
2020-12-01 01:42:14 +08:00
'pyopenssl==19.1.0;python_version<"3.6"',
2020-12-18 14:26:20 +08:00
'pyopenssl==20.0.1;python_version>="3.6"',
2020-03-15 07:34:51 +08:00
'pygments==2.5.2;python_version<"3.5"',
'pygments==2.9.0;python_version>="3.5"',
'traitlets==4.3.3;python_version<"3.7"',
2020-10-22 21:37:10 +08:00
'traitlets==5.0.5;python_version>="3.7"',
2020-09-01 03:03:00 +08:00
'prompt-toolkit==1.0.18;python_version<"3.6"',
2021-03-23 14:48:14 +08:00
'prompt-toolkit==3.0.18;python_version>="3.6"',
2021-04-03 10:47:24 +08:00
'decorator==4.4.2',
2021-02-11 12:40:51 +08:00
'ipython==5.10.0;python_version<"3.5"',
'ipython==6.5.0;python_version>="3.5" and python_version<"3.6"',
'ipython==7.16.1;python_version>="3.6" and python_version<"3.7"',
2021-05-06 09:07:45 +08:00
'ipython==7.23.1;python_version>="3.7"',
'matplotlib-inline==0.1.2;python_version>="3.7"',
"colorama==0.4.4",
2020-10-02 15:43:13 +08:00
'pathlib2==2.3.5;python_version<"3.5"', # Sync with "virtualenv"
2020-11-24 01:22:26 +08:00
'importlib-metadata==2.0.0;python_version<"3.6"', # Sync "virtualenv"
2021-05-06 09:07:45 +08:00
"virtualenv>=20.4.6", # Sync with importlib-metadata and pathlib2
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.6.0",
"boto==2.49.0",
"cffi==1.14.5",
"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"',
2021-04-03 10:47:24 +08:00
'Pillow==8.2.0;python_version>="3.6"',
2021-04-06 10:40:00 +08:00
'rich==10.1.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"',
2020-10-22 21:37:10 +08:00
'pdfminer.six==20201018;python_version>="3.5"',
2018-08-30 13:57:40 +08:00
],
extras_require={
# pip install -e .[coverage]
"coverage": [
"coverage==5.5",
"pytest-cov==2.11.1",
],
# pip install -e .[flake]
"flake": [
'flake8==3.7.9;python_version<"3.5"',
2021-04-16 14:50:49 +08:00
'flake8==3.9.1;python_version>="3.5"',
'pyflakes==2.1.1;python_version<"3.5"',
2021-03-27 05:51:03 +08:00
'pyflakes==2.3.1;python_version>="3.5"',
'pycodestyle==2.5.0;python_version<"3.5"',
2021-03-15 08:00:05 +08:00
'pycodestyle==2.7.0;python_version>="3.5"',
],
},
2018-08-30 13:57:40 +08:00
packages=[
"seleniumbase",
"seleniumbase.common",
"seleniumbase.config",
"seleniumbase.console_scripts",
"seleniumbase.core",
"seleniumbase.drivers",
"seleniumbase.extensions",
"seleniumbase.fixtures",
"seleniumbase.masterqa",
"seleniumbase.plugins",
"seleniumbase.translate",
"seleniumbase.utilities",
"seleniumbase.utilities.selenium_grid",
"seleniumbase.utilities.selenium_ide",
"seleniumbase.virtual_display",
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")