Skip to content

Commit b89513f

Browse files
committed
docs: update polyversion output path
1 parent 6a772bb commit b89513f

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

docsrc/poly.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@
2323

2424
logger = getLogger(__name__)
2525

26+
#: Determine repository root directory
27+
root = Git.root(Path(__file__).parent)
28+
2629
#: CodeRegex matching the branches to build docs for
2730
BRANCH_REGEX = r"^(master|dev)$"
2831

2932
#: Regex matching the tags to build docs for
3033
TAG_REGEX = r"^v[\.0-9]*$"
3134

3235
#: Output dir relative to project root
33-
OUTPUT_DIR = "docsrc/_build_polyversion"
36+
OUTPUT_DIR = "_build_polyversion"
3437

3538
#: Source directory
3639
SOURCE_DIR = "docsrc"
@@ -86,20 +89,6 @@ def root_data(driver):
8689

8790
# Load overrides read from commandline to global scope
8891
apply_overrides(globals())
89-
# Determine repository root directory
90-
root = Git.root(Path(__file__).parent)
91-
92-
93-
async def selector(rev, keys):
94-
"""Select configuration based on revision"""
95-
# map all v1 revisions to one configuration
96-
if rev.name.startswith("v1."):
97-
return "v1"
98-
elif rev.name in ["master"]:
99-
# special configuration for v1 master branch
100-
return rev.name
101-
# common config for everything else
102-
return None
10392

10493

10594
# adapted from Pip
@@ -232,6 +221,19 @@ async def __call__(self, path: Path) -> None:
232221

233222
creator = LocalVenvCreator()
234223

224+
225+
async def selector(rev, keys):
226+
"""Select configuration based on revision"""
227+
# map all v1 revisions to one configuration
228+
if rev.name.startswith("v1."):
229+
return "v1"
230+
elif rev.name in ["master"]:
231+
# special configuration for v1 master branch
232+
return rev.name
233+
# common config for everything else
234+
return None
235+
236+
235237
ENVIRONMENT = {
236238
# configuration for v2 and dev
237239
None: DynamicPip.factory(venv=Path(".venv"), args=["-e", "."] + SPHINX_DEPS + V2_BACKEND_DEPS, creator=creator),

0 commit comments

Comments
 (0)