From 078bae613fd647958476f265248e67f5890378c6 Mon Sep 17 00:00:00 2001 From: csteiner <47841949+clintonsteiner@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:10:53 -0600 Subject: [PATCH 1/3] Update conf.py automatically keep copyright date the current year --- source/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/conf.py b/source/conf.py index f08f6e836..39cae9991 100644 --- a/source/conf.py +++ b/source/conf.py @@ -2,6 +2,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os +from datetime import date # Some options are only enabled for the main packaging.python.org deployment builds RTD_BUILD = bool(os.getenv("READTHEDOCS")) @@ -13,7 +14,7 @@ project = "Python Packaging User Guide" -copyright = "2013–2020, PyPA" +copyright = f"2013–{date.today().year}, PyPA" author = "Python Packaging Authority" # -- General configuration ------------------------------------------------------------- From e17bc4d405df34766e4061fa22bb573ae4f79276 Mon Sep 17 00:00:00 2001 From: CJ Steiner Date: Tue, 7 Jan 2025 03:31:14 -0600 Subject: [PATCH 2/3] conf: update to use end year only --- source/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/conf.py b/source/conf.py index 39cae9991..1a6b272f1 100644 --- a/source/conf.py +++ b/source/conf.py @@ -2,7 +2,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os -from datetime import date +import time # Some options are only enabled for the main packaging.python.org deployment builds RTD_BUILD = bool(os.getenv("READTHEDOCS")) @@ -13,9 +13,9 @@ ) project = "Python Packaging User Guide" - -copyright = f"2013–{date.today().year}, PyPA" author = "Python Packaging Authority" +cur_year = time.strfime("%Y") +copyright = f"{cur_year}, {author}" # -- General configuration ------------------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration From 380331ca225c59894a3811ad8aa2dc3a58ea7d66 Mon Sep 17 00:00:00 2001 From: CJ Steiner Date: Tue, 7 Jan 2025 03:43:53 -0600 Subject: [PATCH 3/3] fix time usage to pass in default time --- source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/conf.py b/source/conf.py index 1a6b272f1..e0ef4b968 100644 --- a/source/conf.py +++ b/source/conf.py @@ -2,7 +2,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os -import time +from time import strftime # Some options are only enabled for the main packaging.python.org deployment builds RTD_BUILD = bool(os.getenv("READTHEDOCS")) @@ -14,7 +14,7 @@ project = "Python Packaging User Guide" author = "Python Packaging Authority" -cur_year = time.strfime("%Y") +cur_year = strftime("%Y") copyright = f"{cur_year}, {author}" # -- General configuration -------------------------------------------------------------