From 673d2c78be76f1ccbb2e1017e5240d52f428b400 Mon Sep 17 00:00:00 2001 From: Sandeep Suryaprasad <26169602+sandeepsuryaprasad@users.noreply.github.com> Date: Wed, 20 Nov 2024 05:33:17 +0530 Subject: [PATCH] [py] moved project metadata from `setup.py` to `pyproject.toml` (#14311) --- py/pyproject.toml | 44 +++++++++++++++++++++++++++++++++- py/setup.py | 60 +---------------------------------------------- 2 files changed, 44 insertions(+), 60 deletions(-) diff --git a/py/pyproject.toml b/py/pyproject.toml index eecffc1f3c3c8..7ee15417a32f1 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -2,12 +2,54 @@ requires = ["setuptools", "setuptools-rust"] build-backend = "setuptools.build_meta" +[project] +name = "selenium" +version = "4.27.0.dev202410311942" +license = "Apache 2.0" +description = "Official Python bindings for Selenium WebDriver." +readme = "README.rst" +requires-python = "~=3.8" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX", + "Operating System :: Microsoft :: Windows", + "Operating System :: MacOS :: MacOS X", + "Topic :: Software Development :: Testing", + "Topic :: Software Development :: Libraries", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + ] +dependencies = [ + "urllib3[socks]>=1.26,<3", + "trio~=0.17", + "trio-websocket~=0.9", + "certifi>=2021.10.8", + "typing_extensions~=4.9", + "websocket-client~=1.8", + ] + +[tool.setuptools] +zip-safe = false + [tool.setuptools.packages.find] include = ["selenium*"] exclude = ["test*"] -namespaces = false +namespace = false # include-package-data is `true` by default in pyproject.toml +[project.urls] +Repository = "https://github.com/SeleniumHQ/selenium/" +BugTracker = "https://github.com/SeleniumHQ/selenium/issues" +Changelog = "https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES" +Documentation = "https://www.selenium.dev/documentation/overview/" +SourceCode = "https://github.com/SeleniumHQ/selenium/tree/trunk/py" + [tool.setuptools.package-data] selenium_package = [ "*.py", diff --git a/py/setup.py b/py/setup.py index cd6b84b8e2c14..3014b5321e307 100755 --- a/py/setup.py +++ b/py/setup.py @@ -27,70 +27,12 @@ setup_args = { 'cmdclass': {'install': install}, - 'name': 'selenium', - 'version': "4.27.0.dev202410311942", - 'license': 'Apache 2.0', - 'description': 'Official Python bindings for Selenium WebDriver.', - 'long_description': open(join(abspath(dirname(__file__)), "README.rst")).read(), - 'url': 'https://github.com/SeleniumHQ/selenium/', - 'project_urls': { - 'Bug Tracker': 'https://github.com/SeleniumHQ/selenium/issues', - 'Changes': 'https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES', - 'Documentation': 'https://www.selenium.dev/documentation/overview/', - 'Source Code': 'https://github.com/SeleniumHQ/selenium/tree/trunk/py', - }, - 'python_requires': '~=3.8', - 'classifiers': ['Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: POSIX', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: MacOS :: MacOS X', - 'Topic :: Software Development :: Testing', - 'Topic :: Software Development :: Libraries', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - ], - 'package_dir': { - 'selenium': 'selenium', - 'selenium.common': 'selenium/common', - 'selenium.webdriver': 'selenium/webdriver', - }, - 'packages': ['selenium', - 'selenium.common', - 'selenium.webdriver', - 'selenium.webdriver.chrome', - 'selenium.webdriver.chromium', - 'selenium.webdriver.common', - 'selenium.webdriver.edge', - 'selenium.webdriver.firefox', - 'selenium.webdriver.ie', - 'selenium.webdriver.remote', - 'selenium.webdriver.safari', - 'selenium.webdriver.support', - 'selenium.webdriver.webkitgtk', - 'selenium.webdriver.wpewebkit', - ], - 'include_package_data': True, - 'install_requires': [ - "urllib3[socks]>=1.26,<3", - "trio~=0.17", - "trio-websocket~=0.9", - "certifi>=2021.10.8", - "typing_extensions~=4.9", - "websocket-client~=1.8", - ], 'rust_extensions': [ RustExtension( {"selenium-manager": "selenium.webdriver.common.selenium-manager"}, binding=Binding.Exec ) ], - 'zip_safe': False } -setup(**setup_args) +setup(**setup_args) \ No newline at end of file