microsoft/TypeAgent
Publicmirrored from https://github.com/microsoft/TypeAgentAvailable
python/ta/Makefile
40lines · modecode
| 1 | # Copyright (c) Microsoft Corporation. |
| 2 | # Licensed under the MIT License. |
| 3 | |
| 4 | # This is Guido's Makefile. Please don't make it complicated. |
| 5 | |
| 6 | .PHONY: help |
| 7 | help: |
| 8 | @echo "Usage: make [target]" |
| 9 | @echo "make help # Help" |
| 10 | @echo "make all # test, demo, build" |
| 11 | @echo "make test # Run pyright" |
| 12 | @echo "make demo # Run import_podcast demo" |
| 13 | @echo "make build # Build the wheel (under dist/)" |
| 14 | @echo "make venv # Create venv/" |
| 15 | @echo "make clean # Remove build/, dist/, venv/" |
| 16 | |
| 17 | .PHONY: all |
| 18 | all: test demo build |
| 19 | |
| 20 | .PHONY: test |
| 21 | # To install pyright, use `npm install -g pyright` . |
| 22 | test: |
| 23 | pyright typeagent |
| 24 | |
| 25 | .PHONY: build |
| 26 | build: venv |
| 27 | venv/bin/python -m build --wheel |
| 28 | |
| 29 | .PHONY: demo |
| 30 | demo: venv |
| 31 | venv/bin/python -m typeagent.memconv testdata/npr.txt |
| 32 | |
| 33 | # Not phony -- the venv directory is the product of this rule. |
| 34 | venv: |
| 35 | python -m venv venv || (rm -rf venv && exit 1) |
| 36 | venv/bin/pip install build |
| 37 | |
| 38 | .PHONY: clean |
| 39 | clean: |
| 40 | rm -rf build dist venv *.egg-info |