Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
py-quickstart/Makefile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
54 lines (39 sloc)
1.2 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifeq ($(OS), Windows_NT) | |
# this will always fail from inside VSCode due to how it handles venv's | |
INVENV := $(shell pip3 -V | findstr 'venv') | |
else | |
INVENV := $(shell pip3 -V | grep 'venv') | |
endif | |
current_dir = $(shell pwd) | |
build: | |
mkdocs build --clean | |
serve: | |
mkdocs serve | |
publish: | |
mkdocs gh-deploy --config-file ./mkdocs.yml --remote-branch gh-pages | |
clean: | |
rm -rf ./site | |
prereqs: venvcheck FORCE | |
pip install -r requirements.txt | |
venv: FORCE | |
python3 -m venv venv | |
venvcheck: | |
# TODO: This check fails on windows systems and will not allow prereqs to work, fix it (I think it's mostly a VSCode problem.) | |
# Unless you are using VSCode and then venvs are used by default, check the bottom left hand corner to see if you are inside the venv. | |
ifeq ($(INVENV),) | |
ifeq ($(OS), Windows_NT) | |
ifeq ($(SHELL), sh.exe) | |
$(info Currently, native windows isn't supported in this makefile code. Use 'pip install -r requirements.txt' from within a venv) | |
else | |
endif | |
else | |
$(error You should only run this from within the venv. Use '. ./venv/bin/activate') | |
endif | |
else | |
@echo "venv check passed\n" | |
endif | |
FORCE: | |
fix: | |
git clone https://github.coventry.ac.uk/csx239/mk_doc_ultra.git | |
test: | |
@echo "$(SHELL)" |