Skip to content

Commit cfa977f

Browse files
committed
Document how to run locally, and make said parameter less error-prone.
1 parent 377a0a5 commit cfa977f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
This repository contains scripts for automatically building the Python
22
documentation on docs.python.org.
3+
4+
# How to test it?
5+
6+
$ mkdir www logs build_root
7+
$ python3 -m venv build_root/venv/
8+
$ build_root/venv/bin/python -m pip install -r requirements.txt
9+
$ python3 ./build_docs.py --quick --build-root build_root --www-root www --log-directory logs --group $(id -g)

build_docs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,12 @@ def parse_args():
293293

294294
def main():
295295
args = parse_args()
296+
if args.log_directory:
297+
args.log_directory = os.path.abspath(args.log_directory)
298+
if args.build_root:
299+
args.build_root = os.path.abspath(args.build_root)
300+
if args.www_root:
301+
args.www_root = os.path.abspath(args.www_root)
296302
if sys.stderr.isatty():
297303
logging.basicConfig(format="%(levelname)s:%(message)s",
298304
stream=sys.stderr)

0 commit comments

Comments
 (0)