Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
create Makefile for faster iteration
* makefile can automatically build the package, then navigate to the
  cpython repository to install the package and/or rebuild documentation
  • Loading branch information
jdevries3133 committed May 2, 2022
commit e47e5a6e5c900e5dca8a655ceee1d42a75aa3dc9
9 changes: 9 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
- bump version (YYYY.MM.dev) in setup.py and python_docs_theme/theme.conf
- Commit this last bump.
- push and push the tag (``git push && git push --tags``)

# Makefile Usage

This project includes a simple Makefile for syncing changes to the theme with
the main cpython repository. Run ``make help`` for details on available rules.

There is one configurable variable, ``CPYTHON_ROOT``, which should be the path
to the cpython repository on your machine. By default, it points to
``../cpython``.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CPYTHON_ROOT = ../cpython
PACKAGE_ABS_PATH = $(shell pwd)/$(shell find dist/python-docs-theme-*.tar.gz)


.PHONY: all
all: install
cd $(CPYTHON_ROOT)/Doc && \
make html


.PHONY: install
install:
python3 -m build
cd $(CPYTHON_ROOT)/Doc && \
./venv/bin/pip install $(PACKAGE_ABS_PATH)

.PHONY: help
help:
@echo "all: run the \`\`\install\`\\ rule, and also rebuild the cpython docs"
@echo "install: build the package, and install it in the virtual environment"
@echo " at $(CPYTHON_ROOT)/Doc/venv"