diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c576196..cccef3f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,9 @@ UNRELEASED ---------- * ``pytest-mock`` now requires ``pytest>=6.2.5``. +* `#410 `_: pytest-mock's ``setup.py`` file is removed. + If you relied on this file, e.g. to install pytest using ``setup.py install``, + please see `Why you shouldn't invoke setup.py directly `_ for alternatives. 3.12.0 (2023-10-19) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 8e6c7b0..9865b37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,59 @@ requires = [ ] build-backend = "setuptools.build_meta" +[project] +name = "pytest-mock" +description = "Thin-wrapper around the mock package for easier use with pytest" +authors = [ + {name = "Bruno Oliveira", email = "nicoddemus@gmail.com"}, +] +dependencies = [ + "pytest>=6.2.5", +] +dynamic = ["version"] +requires-python = ">=3.8" +readme = "README.rst" +license = {text = "MIT"} +keywords = ["pytest", "mock"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Pytest", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "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", + "Topic :: Software Development :: Testing", +] + +[project.urls] +Homepage = "https://github.com/pytest-dev/pytest-mock/" +Documentation = "https://pytest-mock.readthedocs.io/en/latest/" +Changelog = "https://pytest-mock.readthedocs.io/en/latest/changelog.html" +Source = "https://github.com/pytest-dev/pytest-mock/" +Tracker = "https://github.com/pytest-dev/pytest-mock/issues" + +[project.optional-dependencies] +dev = [ + "pre-commit", + "pytest-asyncio", + "tox", +] + +[project.entry-points.pytest11] +pytest_mock = "pytest_mock" + +[tool.setuptools.package-data] +pytest_mock = ["py.typed"] + +[tool.setuptools_scm] +write_to = "src/pytest_mock/_version.py" + [tool.ruff.lint] extend-select = ["I001"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 5e89ed3..0000000 --- a/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -from setuptools import find_packages -from setuptools import setup - -setup( - name="pytest-mock", - entry_points={"pytest11": ["pytest_mock = pytest_mock"]}, - packages=find_packages(where="src"), - package_dir={"": "src"}, - platforms="any", - package_data={ - "pytest_mock": ["py.typed"], - }, - python_requires=">=3.8", - install_requires=["pytest>=6.2.5"], - use_scm_version={"write_to": "src/pytest_mock/_version.py"}, - setup_requires=["setuptools_scm"], - url="https://github.com/pytest-dev/pytest-mock/", - license="MIT", - author="Bruno Oliveira", - author_email="nicoddemus@gmail.com", - description="Thin-wrapper around the mock package for easier use with pytest", - long_description=open("README.rst", encoding="utf-8").read(), - long_description_content_type="text/x-rst", - keywords="pytest mock", - extras_require={"dev": ["pre-commit", "tox", "pytest-asyncio"]}, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Framework :: Pytest", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "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", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development :: Testing", - ], - project_urls={ - "Documentation": "https://pytest-mock.readthedocs.io/en/latest/", - "Changelog": "https://pytest-mock.readthedocs.io/en/latest/changelog.html", - "Source": "https://github.com/pytest-dev/pytest-mock/", - "Tracker": "https://github.com/pytest-dev/pytest-mock/issues", - }, -)