-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (45 loc) · 1.27 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
57
58
59
60
61
62
63
64
#
# ultimate-discord-smash-bot/Makefile ---
#
ifeq (${ULTIMATE_DISCORD_SMASH_BOT_DIR},)
$(error source setup.env)
endif
SHELL:=bash
.SUFFIXES:
#####
_default: _ve_build
#####
_apt_get_install:
# For python3
sudo apt-get install -y python3 python3-venv python3-setuptools python3-wheel
_brew_install:
# For python3 for OSX
brew install python3
# Use brew pip3 to install packages
/usr/local/bin/pip3 install wheel setuptools
#####
sys_python3_exe=$(shell PATH=/usr/bin:/usr/local/bin:${PATH} type -p python3)
# check they are set.
ifeq (${sys_python3_exe},)
$(error the system python3 was not found.)
endif
sys_virtualenv_cmd:=${sys_python3_exe} -m venv
ve_python3_exe:=${ULTIMATE_DISCORD_SMASH_BOT_VE_DIR}/bin/python3
ve_pip3_cmd:=${ve_python3_exe} -m pip
ultimate-discord-smash-bot_pip_install_cmd:=${ve_pip3_cmd} install --editable ${ULTIMATE_DISCORD_SMASH_BOT_DIR}
#####
_ve_build:
# create
${sys_virtualenv_cmd} ${ULTIMATE_DISCORD_SMASH_BOT_VE_DIR}
# pip update
${ve_pip3_cmd} install --upgrade pip setuptools wheel
# extra packages
${ve_pip3_cmd} install -r requirements.txt
# install ourselves.
# ${ve_pip3_cmd} install -e .
_ve_rm:
rm -rf ${ULTIMATE_DISCORD_SMASH_BOT_VE_DIR}
_ve_rebuild: _ve_rm _ve_build
#####
_test:
cd tests/ && python3 -m unittest tests.py