From fc40a38ce339db4e10f9d20ceda0c18a152c12e9 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Sat, 7 Mar 2026 13:52:15 +0100 Subject: [PATCH] Migrate to pyproject.toml (PEP 621), remove setup.py and setup.cfg Consolidate all build configuration into pyproject.toml, replacing the legacy setup.py/setup.cfg approach. Tested on Python 3.9, 3.12, and 3.13. Co-Authored-By: Claude Opus 4.6 --- pyproject.toml | 33 ++++++++++++++++++++++++++++++++- setup.cfg | 5 ----- setup.py | 42 ------------------------------------------ 3 files changed, 32 insertions(+), 48 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 7d3fc6b..67d0624 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,38 @@ +[build-system] +requires = ["setuptools>=64", "setuptools-scm>=8"] +build-backend = "setuptools.build_meta" + [project] name = "python-anticaptcha" +description = "Client library for solve captchas with Anticaptcha.com support." +readme = "README.rst" +license = "MIT" requires-python = ">=3.9" -dynamic = ["version", "description", "readme", "dependencies", "optional-dependencies"] +dependencies = ["requests"] +dynamic = ["version"] +keywords = ["recaptcha", "captcha", "development"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] + +[project.urls] +Homepage = "https://github.com/ad-m/python-anticaptcha" + +[project.optional-dependencies] +async = ["httpx>=0.24"] +tests = ["pytest", "retry", "selenium"] +docs = ["sphinx"] + +[tool.setuptools-scm] +fallback_version = "0.0.0" [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b30d3fa..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[bumpversion] -current_version = 0.4.2 -commit = True -tag = True -tag_name = {new_version} diff --git a/setup.py b/setup.py deleted file mode 100644 index 6522cf8..0000000 --- a/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -from setuptools import setup -from os import path - -here = path.abspath(path.dirname(__file__)) - -with open(path.join(here, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - - -tests_deps = ["retry", "pytest", "selenium"] - -extras = {"tests": tests_deps, "docs": "sphinx"} - -setup( - name="python-anticaptcha", - description="Client library for solve captchas with Anticaptcha.com support.", - long_description=long_description, - long_description_content_type="text/x-rst", - url="https://github.com/ad-m/python-anticaptcha", - author="Adam Dobrawy", - author_email="naczelnik@jawne.info.pl", - license="MIT", - python_requires=">=3.9", - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - ], - use_scm_version=True, - setup_requires=["setuptools_scm", "wheel"], - keywords="recaptcha captcha development", - packages=["python_anticaptcha"], - install_requires=["requests"], - extras_require=extras, -)