From 1bbca14e440863b17f719d8e1e57abe965cf5968 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Mon, 13 Jun 2022 15:41:32 +0200 Subject: [PATCH] Use latest sphinx for python_version >= 3.8 --- .github/workflows/docs.yml | 2 +- requirements/requirements-dev.in | 1 + requirements/requirements-dev.txt | 5 +++-- requirements/requirements.in | 2 +- setup.py | 14 +++++++++++--- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8a020f7..81b2b40 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -# Copyright (C) 2020, 2021 Serghei Iakovlev +# Copyright (C) 2020, 2021, 2022 Serghei Iakovlev # # This file is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/requirements/requirements-dev.in b/requirements/requirements-dev.in index a3dc2d1..82b8137 100644 --- a/requirements/requirements-dev.in +++ b/requirements/requirements-dev.in @@ -27,6 +27,7 @@ furo # freeze sphinx because flake8 requires importlib-metadata<4.3 # for python<3.8 but sphinx>=4.4.0 requires importlib-metadata>=4.4 sphinx>=3.5.0,<=4.3.2; python_version < '3.8' +sphinx>=3.5.0; python_version >= '3.8' # develop twine diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 94270ba..2afc312 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -130,8 +130,9 @@ snowballstemmer==2.2.0 # via sphinx soupsieve==2.3.2.post1 # via beautifulsoup4 -sphinx==5.0.1 +sphinx==5.0.1 ; python_version >= "3.8" # via + # -r requirements/requirements-dev.in # furo # sphinx-basic-ng sphinx-basic-ng==0.0.1a11 @@ -182,7 +183,7 @@ zipp==3.8.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==62.3.4 +setuptools==62.4.0 # via # astroid # check-manifest diff --git a/requirements/requirements.in b/requirements/requirements.in index 3fbe474..4baa1a7 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -1,4 +1,4 @@ -# Copyright (C) 2020, 2021 Serghei Iakovlev +# Copyright (C) 2020, 2021, 2022 Serghei Iakovlev # # This file is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/setup.py b/setup.py index 1e3d11d..a778421 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2020, 2021 Serghei Iakovlev +# Copyright (C) 2020, 2021, 2022 Serghei Iakovlev # # This file is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -175,8 +175,14 @@ def get_version_string(): 'flake8-blind-except>=0.2.0', # Checks for blind except: statements 'check-manifest>=0.45', # Check MANIFEST.in ], - 'docs': [ + # freeze sphinx because flake8 requires importlib-metadata<4.3 + # for python<3.8 but sphinx>=4.4.0 requires importlib-metadata>=4.4 + 'docs:python_version < "3.8"': [ 'furo>=2022.4.7,==2022.4.*', # Sphinx documentation theme + 'sphinx>=3.5.0,<=4.3.2', # Python documentation generator + ], + 'docs:python_version >= "3.8"': [ + 'furo>=2022.6.4.1,==2022.6.*', # Sphinx documentation theme 'sphinx>=3.5.0', # Python documentation generator ], } @@ -190,7 +196,9 @@ def get_version_string(): ] EXTRAS_REQUIRE['develop'] = \ - DEVELOP_REQUIRE + EXTRAS_REQUIRE['testing'] + EXTRAS_REQUIRE['docs'] + DEVELOP_REQUIRE + EXTRAS_REQUIRE['testing'] + \ + EXTRAS_REQUIRE['docs:python_version < "3.8"'] + \ + EXTRAS_REQUIRE['docs:python_version >= "3.8"'] # Project's URLs PROJECT_URLS = {