Skip to content
Prev Previous commit
Next Next commit
Makefile: no-single-branch cpython
Doing shallow clone (--depth 1) didn't make possible to checkout other branches of CPython, which could be useful for using this script in other branches at some point, e.g. building Python docs.
  • Loading branch information
rffontenelle committed May 10, 2020
commit c005789f0be10b68e37bd7ee696bc5ff12eae728
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ build: setup
html

@echo "Success! Open file://$(CPYTHON_WORKDIR)/Doc/build/html/index.html, " \
"or run 'make serve' to see them in http://localhost:8000";
"or run 'make serve' to see them in http://localhost:8000";


# push: push changed translation files and Transifex config file to repository.
Expand Down Expand Up @@ -151,9 +151,11 @@ pot: setup
setup: venv
@if ! [ -d $(CPYTHON_PATH) ]; then \
echo "CPython repo not found; cloning ..."; \
git clone --depth 1 --branch $(BRANCH) $(UPSTREAM) $(CPYTHON_PATH); \
git clone --depth 1 --no-single-branch $(UPSTREAM) $(CPYTHON_PATH); \
git -C $(CPYTHON_PATH) checkout $(BRANCH); \
else \
echo "CPython repo found; updating ..."; \
git -C $(CPYTHON_PATH) checkout $(BRANCH); \
git -C $(CPYTHON_PATH) pull --rebase; \
fi

Expand All @@ -166,7 +168,7 @@ setup: venv
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv \
PYTHON=$(PYTHON) venv; \
else \
echo "CPython repo already ready in workdir"; \
echo "CPython repo already ready in workdir"; \
fi

@echo "Setting up translation files in workdir ..."
Expand Down