Skip to content

Commit

Permalink
Define the release and the version in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Aug 12, 2021
1 parent c55d19b commit 858f68d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html
"""Configuration file for the Sphinx documentation builder."""

from functools import partial
from pathlib import Path

from setuptools_scm import get_version

# -- Path setup --------------------------------------------------------------

PROJECT_ROOT_DIR = Path(__file__).parents[1].resolve()
get_scm_version = partial(get_version, root=PROJECT_ROOT_DIR)


# -- Project information -----------------------------------------------------

project = "pip-tools"
author = f"{project} Contributors"
copyright = f"The {author}"

# The short X.Y version
version = ".".join(
get_scm_version(local_scheme="no-local-version",).split(
"."
)[:3],
)

# The full version, including alpha/beta/rc tags
release = get_scm_version()


# -- General configuration ---------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
furo >= 2021.7.5b38
myst-parser >= 0.15.1
setuptools-scm >= 6.0.1
Sphinx >= 4.1.1

0 comments on commit 858f68d

Please sign in to comment.