From 20e564fef27be2f5c2362f36b2fcf4c73c4c3fc2 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Mon, 31 Oct 2022 23:47:00 +0100 Subject: [PATCH] Makefile: fixes for working on debian based system Setup up PY variable because the `python` binary isn't found in these systems. Instead there is only `python3`. So, you can run there commands with: $ make foo PY=python3 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a30207ef..6b68a660 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +SHELL := bash get_venv_dir:=$(shell mktemp -d 2>/dev/null || mktemp -d -t 'tmpvenv') venv_dir := $(get_venv_dir)/pipenv_venv venv_file := $(CURDIR)/.test_venv @@ -18,6 +19,7 @@ write_git_tmpdir = $(file > $(GITDIR_STAMPFILE),$(create_git_tmpdir)) get_checkout_dir = $(file < $(GITDIR_STAMPFILE)) get_checkout_subdir = $(addprefix $(get_checkout_dir), $(1)) pip-checkout-dir = $(get_checkout_dir)/patch-pip +PY ?= python format: black pipenv/*.py @@ -47,7 +49,7 @@ ramdisk: .PHONY: ramdisk-virtualenv ramdisk-virtualenv: ramdisk [ ! -e "/mnt/ramdisk/.venv/bin/activate" ] && \ - python -m venv /mnt/ramdisk/.venv + $(PY) -m venv /mnt/ramdisk/.venv echo "/mnt/ramdisk/.venv" > $(venv_file) .PHONY: virtualenv