From eb08cc0fbe63b7777b9aed97b6a8f76eb15ffe74 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Thu, 18 Oct 2018 12:18:57 +0100 Subject: [PATCH] setup.py: remove pytest-runner; require pytest to run tests python setup.py test no longer works. The 'tests_require' keyword in setup() is no longer supported by setuptools. We use tox to bootstrap the test environment, so we don't need that --- README.rst | 10 ++-------- setup.cfg | 3 --- setup.py | 7 +------ 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/README.rst b/README.rst index f5bd83870..4e6faa469 100644 --- a/README.rst +++ b/README.rst @@ -255,14 +255,8 @@ are needed to unlock optional features. Testing ~~~~~~~ -To run the test suite, you can do: - -.. code:: sh - - python setup.py test - -If you have `pytest `__, you can run -the ``pytest`` command directly. The tests will run against the +To run the test suite, you need to install `pytest `__. +When you run the ``pytest`` command, the tests will run against the installed ``fontTools`` package, or the first one found in the ``PYTHONPATH``. diff --git a/setup.cfg b/setup.cfg index 903fbf34d..2e18773b7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,9 +30,6 @@ universal = 1 [sdist] formats = zip -[aliases] -test = pytest - [metadata] license_file = LICENSE diff --git a/setup.py b/setup.py index a8d7edf65..5eaa349bd 100755 --- a/setup.py +++ b/setup.py @@ -23,8 +23,6 @@ def doraise_py_compile(file, cfile=None, dfile=None, doraise=False): py_compile.compile = doraise_py_compile -needs_pytest = {'pytest', 'test'}.intersection(sys.argv) -pytest_runner = ['pytest_runner'] if needs_pytest else [] needs_wheel = {'bdist_wheel'}.intersection(sys.argv) wheel = ['wheel'] if needs_wheel else [] needs_bumpversion = {'release'}.intersection(sys.argv) @@ -353,10 +351,7 @@ setup( packages=find_packages("Lib"), include_package_data=True, data_files=find_data_files(), - setup_requires=pytest_runner + wheel + bumpversion, - tests_require=[ - 'pytest>=3.0', - ], + setup_requires=wheel + bumpversion, extras_require=extras_require, entry_points={ 'console_scripts': [