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
This commit is contained in:
Oz Tiram
2022-10-31 23:47:00 +01:00
committed by Oz N Tiram
parent e3052f2de9
commit 20e564fef2
+3 -1
View File
@@ -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