SeleniumBase/setup.py

236 lines
10 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:
with open(os.path.join(this_dir, 'README.md'), 'rb') as f:
2020-05-18 13:21:24 +08:00
total_description = f.read().decode('utf-8')
description_lines = total_description.split('\n')
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
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
if sys.argv[-1] == 'publish':
reply = None
input_method = input
if not sys.version_info[0] >= 3:
input_method = raw_input # noqa
reply = str(input_method(
'>>> Confirm release PUBLISH to PyPI? (yes/no): ')).lower().strip()
if reply == 'yes':
print("\n*** Checking code health with flake8:\n")
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")
os.system('rm -f dist/*.egg; rm -f dist/*.tar.gz; rm -f dist/*.whl')
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-02-26 04:08:40 +08:00
os.system("python -m pip install --upgrade 'tqdm>=4.58.0'")
print("\n*** Publishing The Release to PyPI: ***\n")
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(
name='seleniumbase',
version=about['__version__'],
2020-12-25 01:39:07 +08:00
description='A complete web automation framework for end-to-end testing.',
2018-08-28 10:21:10 +08:00
long_description=long_description,
long_description_content_type='text/markdown',
2018-08-28 06:36:52 +08:00
url='https://github.com/seleniumbase/SeleniumBase',
2020-05-03 10:30:18 +08:00
platforms=["Windows", "Linux", "Mac OS-X"],
2015-12-05 05:11:53 +08:00
author='Michael Mintz',
author_email='mdmintz@gmail.com',
2015-12-05 05:11:53 +08:00
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
],
2020-10-14 13:26:30 +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-02-01 04:28:45 +08:00
'pip>=21.0.1;python_version>="3.6"',
2021-01-30 15:39:48 +08:00
'packaging>=20.9',
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-03-01 12:48:54 +08:00
'setuptools>=54.0.0;python_version>="3.6"',
2020-12-22 06:58:47 +08:00
'setuptools-scm>=5.0.1',
2020-12-18 14:26:20 +08:00
'wheel>=0.36.2',
2020-11-12 13:55:20 +08:00
'attrs>=20.3.0',
2021-01-21 13:39:12 +08:00
'PyYAML>=5.4.1;python_version>="3.6"',
2020-12-07 13:48:47 +08:00
'certifi>=2020.12.5',
2020-12-22 06:58:47 +08:00
'six==1.15.0',
'nose==1.3.7',
2021-03-03 11:52:50 +08:00
'ipdb==0.13.5',
'parso==0.7.1;python_version<"3.6"',
'parso==0.8.1;python_version>="3.6"',
'jedi==0.17.2;python_version<"3.6"',
'jedi==0.18.0;python_version>="3.6"',
2020-06-29 11:42:50 +08:00
'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.3', # Must stay in sync with "requests"
2020-12-18 14:26:20 +08:00
'requests==2.25.1',
2019-05-09 13:58:48 +08:00
'selenium==3.141.0',
2020-11-28 03:48:33 +08:00
'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"',
2020-09-05 10:37:48 +08:00
'cssselect==1.1.0',
2020-03-18 11:42:55 +08:00
'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-01-26 03:38:05 +08:00
'pytest==6.2.2;python_version>="3.6"',
2021-01-21 07:30:32 +08:00
'pytest-cov==2.11.1',
2020-07-28 14:54:49 +08:00
'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"',
2020-03-15 07:34:51 +08:00
'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"',
2021-01-10 09:33:06 +08:00
'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-02-11 12:32:41 +08:00
'soupsieve==2.2;python_version>="3.6"',
2020-10-05 09:40:00 +08:00
'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"',
2021-02-17 12:47:50 +08:00
'pygments==2.8.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-02-13 12:13:08 +08:00
'prompt-toolkit==3.0.16;python_version>="3.6"',
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-02-27 07:51:42 +08:00
'ipython==7.21.0;python_version>="3.7"',
2020-10-14 13:37:55 +08:00
'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-02-04 08:33:59 +08:00
'virtualenv>=20.4.2', # 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"',
2021-03-01 12:48:54 +08:00
'coverage==5.5',
2021-01-06 08:21:40 +08:00
'brython==3.9.1',
2021-02-06 12:42:57 +08:00
'pyotp==2.6.0',
2019-12-07 14:53:46 +08:00
'boto==2.49.0',
2021-02-13 12:13:08 +08:00
'cffi==1.14.5',
2020-11-12 13:55:20 +08:00
'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-03-03 11:52:50 +08:00
'Pillow==8.1.1;python_version>="3.6"',
'rich==9.12.4;python_version>="3.6" and python_version<"4.0"',
2020-05-15 16:05:47 +08:00
'flake8==3.7.9;python_version<"3.5"',
2020-10-05 09:40:00 +08:00
'flake8==3.8.4;python_version>="3.5"',
2020-05-15 16:05:47 +08:00
'pyflakes==2.1.1;python_version<"3.5"',
'pyflakes==2.2.0;python_version>="3.5"',
'tornado==5.1.1;python_version<"3.5"',
'tornado==6.1;python_version>="3.5"',
2020-12-07 14:24:32 +08:00
'allure-pytest==2.8.22;python_version<"3.5"',
2021-03-03 11:52:50 +08:00
'allure-pytest==2.8.35;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
],
packages=[
'seleniumbase',
'seleniumbase.common',
'seleniumbase.config',
'seleniumbase.console_scripts',
'seleniumbase.core',
'seleniumbase.drivers',
'seleniumbase.extensions',
2018-08-30 13:57:40 +08:00
'seleniumbase.fixtures',
'seleniumbase.masterqa',
'seleniumbase.plugins',
2020-03-16 12:41:24 +08:00
'seleniumbase.translate',
2018-08-30 13:57:40 +08:00
'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
],
2015-12-05 05:11:53 +08:00
'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',
2015-12-09 05:33:44 +08:00
('db_reporting = '
'seleniumbase.plugins.db_reporting_plugin:DBReporting'),
2015-12-05 05:11:53 +08:00
'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")