make isntall
This commit is contained in:
24
Makefile
24
Makefile
@@ -20,7 +20,29 @@ help:
|
||||
@printf " make clean Remove build artifacts\n"
|
||||
|
||||
deps:
|
||||
$(PIP) install -e ".[build]"
|
||||
@set -eu; \
|
||||
PIP_CMD="$(PIP)"; \
|
||||
if ! $$PIP_CMD --version >/dev/null 2>&1; then \
|
||||
if command -v pip3 >/dev/null 2>&1; then \
|
||||
PIP_CMD="pip3"; \
|
||||
elif $(PYTHON) -m ensurepip --version >/dev/null 2>&1; then \
|
||||
$(PYTHON) -m ensurepip --upgrade; \
|
||||
elif command -v apt-get >/dev/null 2>&1; then \
|
||||
echo "pip missing; installing python3-pip via apt-get (sudo required)"; \
|
||||
sudo apt-get update; \
|
||||
sudo apt-get install -y python3-pip; \
|
||||
elif command -v dnf >/dev/null 2>&1; then \
|
||||
echo "pip missing; installing python3-pip via dnf (sudo required)"; \
|
||||
sudo dnf install -y python3-pip; \
|
||||
elif command -v brew >/dev/null 2>&1; then \
|
||||
echo "pip missing; installing python via Homebrew"; \
|
||||
brew install python; \
|
||||
else \
|
||||
echo "Unable to bootstrap pip automatically. Install pip for $(PYTHON) and rerun make deps."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
$$PIP_CMD install -e ".[build]"
|
||||
|
||||
build: deps
|
||||
$(PYTHON) -m PyInstaller --noconfirm --clean --onefile --name flow --paths "$(SRC_DIR)" "$(ENTRYPOINT)"
|
||||
|
||||
Reference in New Issue
Block a user