-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (36 loc) · 1006 Bytes
/
Makefile
File metadata and controls
42 lines (36 loc) · 1006 Bytes
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
39
40
41
42
PROJ_BASE=$(shell pwd)
PYTHONVENV=$(PROJ_BASE)/venv
VENVPYTHON=$(PYTHONVENV)/bin/python
PHONY: init
init:
@echo "Creating virtual environment 'venv' for development."
python3 -m venv venv || python -m venv venv
$(VENVPYTHON) -m pip install --upgrade setuptools pip
@echo "\nYou may want to activate the virtual environmnent with 'source venv/bin/activate'\n"
PHONY: develop
develop:
@echo "Installing twitterpi, with editible modules ('python -m pip install --editable .[test]')"
$(VENVPYTHON) -m pip install --editable .[test]
PHONY: build
build:
flake8 .
$(VENVPYTHON) -m pip install build
$(VENVPYTHON) -m build
PHONY: clean
clean:
@echo "Removing build artifacts"
rm -rf $(PROJ_BASE)/build
rm -rf $(PROJ_BASE)/dist
rm -rf $(PROJ_BASE)/*.egg-info
rm -rf $(PROJ_BASE)/docs/_build/*
rm -f $(PROJ_BASE)/*coverage*
rm -rf $(PROJ_BASE)/tests/htmlcov
PHONY: sparkling
sparkling: clean
rm -rf $(PROJ_BASE)/venv*
PHONY: test
test:
rm -f .coverage
rm -rf tests/htmlcov
pytest
flake8 .