From 9ed2542e938c327a53c17f8932ee5fc53776ba31 Mon Sep 17 00:00:00 2001 From: Zsolt Dollenstein Date: Sun, 29 Mar 2020 03:06:00 +0100 Subject: [PATCH] Omit commit hash and date stamp from doc version (#1322) This also removes the dependency on setuptools-scm while building the docs. Fixes #1104. --- docs/conf.py | 6 +++--- docs/requirements.txt | 1 - readthedocs.yml | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 37a6f84..01d695f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,7 @@ import re import shutil import string -from setuptools_scm import get_version +from pkg_resources import get_distribution from recommonmark.parser import CommonMarkParser @@ -83,8 +83,8 @@ copyright = "2018, Łukasz Langa and contributors to Black" author = "Łukasz Langa and contributors to Black" # Autopopulate version -# The full version, including alpha/beta/rc tags. -release = get_version(root=CURRENT_DIR.parent) +# The version, including alpha/beta/rc tags, but not commit hash and datestamps +release = get_distribution("black").version.split("+")[0] # The short X.Y version. version = release for sp in "abcfr": diff --git a/docs/requirements.txt b/docs/requirements.txt index b0bb910..a36fd8a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,2 @@ recommonmark==0.4.0 Sphinx==1.7.2 -setuptools_scm==3.3.3 diff --git a/readthedocs.yml b/readthedocs.yml index d8a016a..1506503 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,3 +3,5 @@ python: version: 3.8 install: - requirements: docs/requirements.txt + - method: setuptools + path: . -- 2.39.5