Skip to content

Commit 65dd2f4

Browse files
authored
Merge pull request #50 from dhellmann/rtd-modernization
docs: add read the docs configuration file
2 parents 910593a + 11c201e commit 65dd2f4

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
python-version:
19-
- 3.7
2019
- 3.8
2120
- 3.9
2221
- "3.10"
@@ -139,10 +138,8 @@ jobs:
139138
- name: Set up Python
140139
uses: actions/setup-python@v4
141140
with:
142-
# Pin this low because RTD doesn't seem to adopt new
143-
# versions quickly and this ensures we don't have a
144-
# dependency problem with importlib.metadata.
145-
python-version: "3.7"
141+
# Pin this to the same version used on in .readthedocs.yaml
142+
python-version: "3.11"
146143

147144
- name: Install dependencies
148145
run: python -m pip install tox

.mergify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pull_request_rules:
2828
- "title~=^docs:"
2929
- "files~=docs"
3030
- "files~=.rst$"
31+
- "files~=.readthedocs.yaml$"
3132
actions:
3233
label:
3334
add:

.readthedocs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-20.04"
5+
tools:
6+
python: "3.11"
7+
8+
python:
9+
# Install our python package before building the docs
10+
install:
11+
- method: pip
12+
path: .

docs/source/conf.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@
1414

1515
import datetime
1616

17-
# Try to import the version from our package, but if that fails
18-
# because of the way the RTD build works fall back to at least using
19-
# the git tag information.
20-
try:
21-
from virtualenvwrapper.version import version
22-
except ImportError:
23-
import subprocess
24-
p = subprocess.run(['git', 'describe'], stdout=subprocess.PIPE)
25-
version = p.stdout.decode('utf-8').strip()
17+
import virtualenvwrapper.version
2618

2719
# If extensions (or modules to document with autodoc) are in another directory,
2820
# add these directories to sys.path here. If the directory is relative to the
@@ -60,7 +52,7 @@
6052
# built documents.
6153
#
6254
# The short X.Y version.
63-
# version = "SEE IMPORTS ABOVE"
55+
version = virtualenvwrapper.version.version
6456
# The full version, including alpha/beta/rc tags.
6557
release = version
6658

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ classifiers = [
1313
"License :: OSI Approved :: MIT License",
1414
"Programming Language :: Python",
1515
"Programming Language :: Python :: 3",
16-
"Programming Language :: Python :: 3.7",
1716
"Programming Language :: Python :: 3.8",
1817
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
@@ -28,7 +27,7 @@ dynamic = ["version"]
2827
keywords = ["virtualenv"]
2928
license = {text = "MIT"}
3029
readme = "README.txt"
31-
requires-python = ">=3.7"
30+
requires-python = ">=3.8"
3231

3332
dependencies = [
3433
"virtualenv",

0 commit comments

Comments
 (0)