Skip to content

Commit 1d88b51

Browse files
authored
Merge pull request #93 from jdevries3133/feat/makefile
2 parents c9b34b9 + b52b8cf commit 1d88b51

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Diff for: CONTRIBUTING.rst

+9
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@
1313
- bump version (YYYY.MM.dev) in setup.py and python_docs_theme/theme.conf
1414
- Commit this last bump.
1515
- push and push the tag (``git push && git push --tags``)
16+
17+
# Makefile usage
18+
19+
This project includes a simple Makefile for syncing changes to the theme with
20+
the main CPython repository. Run ``make help`` for details on available rules.
21+
22+
There is one configurable variable, ``CPYTHON_PATH``, which should be the path
23+
to the CPython repository on your machine. By default, it points to
24+
``../cpython``.

Diff for: Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CPYTHON_PATH = ../cpython
2+
PACKAGE_ABS_PATH = $(shell pwd)/$(shell find dist/python-docs-theme-*.tar.gz)
3+
4+
5+
.PHONY: html
6+
html: venv
7+
cd $(CPYTHON_PATH)/Doc && \
8+
make html
9+
10+
11+
.PHONY: venv
12+
venv:
13+
python3 -m build
14+
cd $(CPYTHON_PATH)/Doc \
15+
&& make venv \
16+
&& ./venv/bin/pip install $(PACKAGE_ABS_PATH)
17+
18+
.PHONY: help
19+
help:
20+
@echo "html: default rule; run the \`venv\` rule, and also rebuild the CPython docs"
21+
@echo "venv: build the package, and install it into the virtual environment"
22+
@echo " at $(CPYTHON_PATH)/Doc/venv"

0 commit comments

Comments
 (0)