@@ -16,35 +16,39 @@ APT_ARGS := --no-install-recommends -y
16
16
PACMAN := $(shell command -v pacman 2>/dev/null)
17
17
PACMAN_ARGS := --noconfirm --needed
18
18
19
- PIPX := $(shell command -v pipx 2>/dev/null)
20
- PIPX_INSTALL_ARGS :=
21
-
22
19
PIP := $(or \
23
- $(shell command -v pipx 2>/dev/null), \
24
20
$(shell command -v pip3 2>/dev/null), \
25
21
$(shell command -v pip 2>/dev/null) \
26
22
)
27
- ifndef PIPX
23
+ ifeq (${VIRTUAL_ENV}, )
28
24
PIP_INSTALL_ARGS := --user --upgrade
29
25
else
30
- PIP_INSTALL_ARGS := ${PIPX_INSTALL_ARGS}
26
+ PIP_INSTALL_ARGS := --upgrade
27
+ endif
28
+
29
+ PIPX := $(shell command -v pipx 2>/dev/null)
30
+ PIPX_INSTALL_ARGS :=
31
+ ifndef PIPX
32
+ PIPX := ${PIP}
33
+ PIPX_INSTALL_ARGS := ${PIP_INSTALL_ARGS}
31
34
endif
32
35
33
36
.PHONY: help
34
37
.DEFAULT: help
35
38
.SILENT: help
36
39
help::
37
40
echo "Available setup targets:"
38
- echo " setup to perform Git repository setup"
39
- echo " install-system-deps to install build (and development) system requirements"
40
- echo " install-python-deps to install build (and development) Python requirements"
41
+ echo " setup to perform Git repository setup"
42
+ echo " install-system-deps to install build (and development) system requirements"
43
+ echo " install-python-deps to install Python runtime requirements with ${PIP}"
44
+ echo " install-python-tools to install Python development tools with ${PIPX}"
41
45
echo
42
46
43
47
.PHONY: setup
44
48
setup:
45
49
git config --local core.hooksPath .git-hooks/
46
50
47
- .PHONY: install-system-deps install-ubuntu-deps install-archlinux-deps install-python-deps
51
+ .PHONY: install-system-deps install-ubuntu-deps install-archlinux-deps install-python-deps install-python-tools
48
52
install-system-deps::
49
53
50
54
# Ubuntu ----------------------------------------------------------------------
@@ -112,19 +116,20 @@ endif
112
116
113
117
# Python ----------------------------------------------------------------------
114
118
ifdef PIP
115
- install-deps:: install-python-deps
119
+ install-deps:: install-python-deps install-python-tools
116
120
endif
117
121
118
122
install-python-deps::
119
123
command -v ${PIP} >/dev/null 2>&1
120
124
${PIP} install ${PIP_INSTALL_ARGS} \
125
+ click \
121
126
conan \
122
127
libtmux \
128
+ toml \
123
129
;
124
130
125
- ifndef WITHOUT_DEV_DEPS
126
- install-python-deps::
127
- command -v ${PIP} >/dev/null 2>&1
131
+ install-python-tools::
132
+ command -v ${PIPX} >/dev/null 2>&1
128
133
for pkg in \
129
134
black \
130
135
mypy \
@@ -134,6 +139,5 @@ install-python-deps::
134
139
yq \
135
140
; \
136
141
do \
137
- ${PIP } install ${PIP_INSTALL_ARGS } $${pkg}; \
142
+ ${PIPX } install ${PIPX_INSTALL_ARGS } $${pkg}; \
138
143
done
139
- endif
0 commit comments