From 5b5b26122e33a7cab795b91a3c2bdafb22a107ce Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 27 Oct 2021 20:58:36 +0000 Subject: [PATCH] Modernize python setup Use pyproject.toml instead of deprecated setup.py arguments and unpin dependencies in tox.ini. --- python/pyproject.toml | 7 +++++++ python/setup.py | 7 ------- python/tox.ini | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 python/pyproject.toml diff --git a/python/pyproject.toml b/python/pyproject.toml new file mode 100644 index 000000000..15d167854 --- /dev/null +++ b/python/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2", "cffi>=1.0.0"] + +[tool.setuptools-scm] +root = ".." +tag_regex = '^(?Ppy-)?(?P[^\+]+)(?P.*)?$' +git_describe_command = "git describe --dirty --tags --long --match py-*.*" diff --git a/python/setup.py b/python/setup.py index 14db819a3..82242e8c2 100644 --- a/python/setup.py +++ b/python/setup.py @@ -8,13 +8,6 @@ def main(): long_description = f.read() setuptools.setup( name='deltachat', - setup_requires=['setuptools_scm', 'cffi>=1.0.0'], - use_scm_version = { - "root": "..", - "relative_to": __file__, - 'tag_regex': r'^(?Ppy-)?(?P[^\+]+)(?P.*)?$', - 'git_describe_command': "git describe --dirty --tags --long --match py-*.*", - }, description='Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat', long_description=long_description, author='holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors', diff --git a/python/tox.ini b/python/tox.ini index fe82cd198..d459cb9fd 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -45,9 +45,8 @@ commands = [testenv:doc] changedir=doc deps = - # Pin dependencies to the versions which actually work with Python 3.5. - sphinx==3.4.3 - breathe==4.28.0 + sphinx + breathe commands = sphinx-build -Q -w toxdoc-warnings.log -b html . _build/html