pytest-runner is a setuptools extension that historically allowed pytest to be invoked via `python setup.py test`. Version 6.0.1 is the latest release, but the project is officially deprecated and its GitHub repository was archived in December 2023. It is no longer recommended for use in modern Python projects due to reliance on deprecated setuptools features and security concerns.
pip install pytest-runnerNo compatibility data collected yet for this library.
This is the *deprecated* quickstart method for `pytest-runner`. It demonstrates how to configure your `setup.py` to use `pytest-runner` to enable the `python setup.py pytest` (or `test`) command. Modern projects are advised to run `pytest` directly or via tools like `tox`.
Remove `pytest-runner` from `setup_requires` and `pytest` from `tests_require` in your `setup.py`. Instead, invoke `pytest` directly (e.g., `python -m pytest` or `pytest`) or use a dedicated test orchestration tool like `tox`. Configure `pytest` using `pyproject.toml`, `pytest.ini`, or `setup.cfg`'s `[tool:pytest]` section.
Follow the deprecation migration path by removing `pytest-runner` and invoking `pytest` directly. Manage test dependencies explicitly in `pyproject.toml` or `requirements.txt` for better security and reproducibility.
Ensure `pytest` is listed as a development dependency. Remove `pytest-runner` and any `setup_requires` or `tests_require` sections related to testing from `setup.py`. Configure `pytest` using `pyproject.toml`, `pytest.ini`, or `setup.cfg`.
Ensure `setuptools` is installed in your Python environment. You can install it using `pip install setuptools`. If you are running this in a container or isolated environment, ensure `setuptools` is included in the environment's dependencies (e.g., in a `requirements.txt` or a Dockerfile).