From 0d0c91fc75c377f8f3f81b758f5c1859d249637c Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Wed, 12 Sep 2018 12:46:24 +0100 Subject: [PATCH] use pyproject.toml to specify build dependencies --- .travis.yml | 2 +- pyproject.toml | 7 +++++++ setup.py | 10 +++------- 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 pyproject.toml diff --git a/.travis.yml b/.travis.yml index 47f85d8..f477beb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ install: # Install our test dependencies. script: # Run our test suite. - if [[ -n $COVERAGE ]]; then export PYTEST_ADDOPTS="--cov=bidict --cov-config=.coveragerc"; fi - - python setup.py test + - pytest tests after_script: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..565303e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = [ + "setuptools >= 35.0.2", + "wheel >= 0.29.0", + "setuptools_scm" +] +build-backend = 'setuptools.build_meta' diff --git a/setup.py b/setup.py index afbe619..08b873e 100644 --- a/setup.py +++ b/setup.py @@ -40,12 +40,7 @@ else: with c_open(join(CWD, 'README.rst'), encoding='utf-8') as f: LONG_DESCRIPTION = f.read() - -SETUP_REQS = [ - 'pytest-runner', - 'setuptools_scm', -] - +SETUP_REQS = ['setuptools_scm'] TEST_REQS = [ 'hypothesis<4', 'hypothesis-pytest<1', @@ -108,7 +103,8 @@ setup( 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', ], - setup_requires=SETUP_REQS, + setup_requires=SETUP_REQS, # required so pip < 10 install works (no PEP-517/8 support) + # for more details see https://www.python.org/dev/peps/pep-0518/#rationale tests_require=TEST_REQS, extras_require=dict( test=TEST_REQS,