Skip to content

Commit 21b9ff9

Browse files
committed
Add setuptools_scm to RTD build
1 parent 28db4e6 commit 21b9ff9

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.readthedocs.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
# Required
66
version: 2
77

8+
build:
9+
os: "ubuntu-22.04"
10+
tools:
11+
python: "3.8"
12+
jobs:
13+
pre_build:
14+
- python -m setuptools_scm
15+
816
# Build documentation in the docs/ directory with Sphinx
917
sphinx:
1018
configuration: docs/source/conf.py
@@ -13,9 +21,9 @@ sphinx:
1321
# Optionally build your docs in additional formats such as PDF
1422
#formats:
1523
#- pdf
24+
#
1625

1726
# Optionally set the version of Python and requirements required to build your docs
1827
python:
19-
version: 3.8
2028
install:
2129
- requirements: docs/requirements.txt

docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
setuptools_scm
12
sphinx
23
sphinx_rtd_theme
34
sphinx-autodoc-typehints

setup.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
from setuptools import find_packages, setup
66

7-
87
REQUIRED_MAJOR = 3
98
REQUIRED_MINOR = 8
109

1110
# Check for python version
1211
if sys.version_info < (REQUIRED_MAJOR, REQUIRED_MINOR):
1312
error = (
14-
"Your version of python ({major}.{minor}) is too old. You need "
15-
"python >= {required_major}.{required_minor}."
13+
"Your version of python ({major}.{minor}) is too old. You need python >= {required_major}.{required_minor}."
1614
).format(
1715
major=sys.version_info.major,
1816
minor=sys.version_info.minor,

0 commit comments

Comments
 (0)