Skip to content

Commit

Permalink
Omit commit hash and date stamp from doc version (#1322)
Browse files Browse the repository at this point in the history
This also removes the dependency on setuptools-scm while building the
docs.

Fixes #1104.
  • Loading branch information
zsol committed Mar 29, 2020
1 parent 7e4c6bf commit 9ed2542
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Expand Up @@ -17,7 +17,7 @@
import shutil
import string

from setuptools_scm import get_version
from pkg_resources import get_distribution
from recommonmark.parser import CommonMarkParser


Expand Down Expand Up @@ -83,8 +83,8 @@ def generate_sections_from_readme():
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":
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
@@ -1,3 +1,2 @@
recommonmark==0.4.0
Sphinx==1.7.2
setuptools_scm==3.3.3
2 changes: 2 additions & 0 deletions readthedocs.yml
Expand Up @@ -3,3 +3,5 @@ python:
version: 3.8
install:
- requirements: docs/requirements.txt
- method: setuptools
path: .

0 comments on commit 9ed2542

Please sign in to comment.