This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
56 lines (47 loc) · 1.48 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: clean-pyc clean-build clean
define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
from urllib import pathname2url
except:
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"
ifeq ($(OS),Windows_NT)
RM := "rm" -rf
FIND := "C:\Program Files\Git\usr\bin\find.exe"
else
RM := rm -rf
FIND := find
endif
help:
@echo "clean - remove all build, test, coverage and Python artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with flake8"
@echo "install - install bagelbot's dependencies to the active Python's site-packages"
@echo "install-dev - install bagelbot's dependencies to the active Python's site-packages plus debug tools for local development"
clean: clean-build clean-pyc
clean-build:
pyenv uninstall -f bagelbot
$(RM) build
$(RM) dist
$(RM) .eggs
$(FIND) . -name '*.egg-info' -exec rm -fr {} +
$(FIND) . -name '*.egg' -exec rm -fr {} +
clean-pyc:
$(FIND) . -name '*.pyc' -exec rm -f {} +
$(FIND) . -name '*.pyo' -exec rm -f {} +
$(FIND) . -name '*~' -exec rm -f {} +
$(FIND) . -name '__pycache__' -exec rm -fr {} +
install: clean
pyenv install 3.6.5 || true
pyenv virtualenv 3.6.5 bagelbot
pip install --upgrade -r requirements.txt
install-dev: clean
pyenv virtualenv 3.6.5 bagelbot
pip install --upgrade -r requirements_dev.txt
lint:
pylint *.py