diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 61 |
1 files changed, 47 insertions, 14 deletions
@@ -1,5 +1,5 @@ install_global=false --include config.mk +-include .config.mk version := $(shell poetry version | awk '{ print $$2 }') @@ -8,23 +8,56 @@ all: @echo "This is a python project, no compilation required" @echo "Installation: make install" -.PHONY: install +setup-arch: +# TODO: We should probabally add some form of "ignore me if already completed" + set -e + echo "WARN: This script has not been tested! Use with caution." + echo "Upgrading System & Installing Python..." + sudo pacman -Syu --noconfirm python python-pip python-flask-babel python-poetry python-babel + echo "Configuring..." + ./configure --prefix=local + echo "Installing Pip Dependencies..." + echo "-> Installing wheel..." + pip install wheel + echo "-> Installing uwsgi..." + pip install uwsgi + echo "-> Installing lxml..." + pip install lxml + echo "-> Installing poetry..." + pip install poetry + echo "Done!" -ifeq ($(install_global), true) -install: install-global -else -install: install-local -endif +setup-deb: +# TODO: We should probabally add some form of "ignore me if already completed" + set -e + echo "WARN: This script has not been tested! Use with caution." + echo "Updating Package Repositories..." + sudo apt update -y + echo "Installing python, python-flask-babel, python-pip, python-is-python3..." + sudo apt install -y python3 python3-flask-babel python3-pip python-is-python3 + echo "Configuring..." + ./configure --prefix=local + echo "Installing Pip Dependencies..." + echo "-> Installing wheel..." + pip install wheel + echo "-> Installing uwsgi..." + pip install uwsgi + echo "-> Installing lxml..." + pip install lxml + echo "-> Installing poetry..." + 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 = $(DESTDIR)$(prefix)/lib/taler-merchant-demos/venv +bindir = $(DESTDIR)$(prefix)/bin -.PHONY: install-local -install-local: compile +.PHONY: install +install: compile + mkdir -p $(bindir) 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 ../lib/taler-merchant-demos/venv/bin/taler-merchant-demos $(bindir)/taler-merchant-demos # run testcases .PHONY: check |