-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 1.04 KB
/
Copy pathMakefile
File metadata and controls
38 lines (27 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: clean build deploy install check-env publish help
REPOSITORY ?= test-pypi
requirements = -r requirements.txt
all: help
clean: ## Clean
@echo "Cleaning..."
@find cljs_loader/ -name '*.pyc' -delete
@rm -rf ./build ./*egg* ./dist
test: install ## Run tests
@cd tests && python manage.py test
build: install clean ## Build for PyPI upload
@echo "Building..."
@python setup.py sdist bdist_wheel --universal
check-env: ## Checks that a virtual environment is active
ifndef VIRTUAL_ENV
$(error VIRTUAL_ENV is undefined)
endif
install: check-env ## Install build dependencies (prerequisite for build)
@echo "Installing build dependencies"
@pip install $(requirements)
generate-rst: ## Use pandoc to generate .rst file
@pandoc --from=markdown --to=rst --output=README.rst README.md
publish: generate-rst build ## Publish to PyPI
@echo "Publishing to pypi..."
@twine upload -r $(REPOSITORY) dist/*
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1, $$2}'