From 245e2ae15c1f770bf6e8953fe951795a9d2461ea Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 23 Feb 2023 23:24:06 +0100 Subject: use venv for installation --- Makefile | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5e3adff..403c64d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ install_global=false --include config.mk +-include .config.mk version := $(shell poetry version | awk '{ print $$2 }') @@ -10,12 +10,6 @@ all: .PHONY: install -ifeq ($(install_global), true) -install: install-global -else -install: install-local -endif - setup-arch: # TODO: We should probabally add some form of "ignore me if already completed" set -e @@ -56,15 +50,15 @@ setup-deb: pip install poetry echo "Done!" -.PHONY: install-global -install-global: compile - poetry build -f wheel - pip3 install --upgrade --ignore-installed "dist/talermerchantdemos-$(version)-py3-none-any.whl" +my_venv = $(prefix)/lib/taler-merchant-demos/venv -.PHONY: install-local -install-local: compile +.PHONY: install +install: compile + mkdir -p $(prefix)/bin poetry build -f wheel - pip3 install --upgrade --ignore-installed --user "dist/talermerchantdemos-$(version)-py3-none-any.whl" + python3 -m venv $(my_venv) + $(my_venv)/bin/pip3 install --upgrade --ignore-installed "dist/talermerchantdemos-$(version)-py3-none-any.whl" + ln -sf $(my_venv)/bin/taler-merchant-demos $(prefix)/bin/taler-merchant-demos # run testcases .PHONY: check -- cgit v1.2.3