Skip to content

Commit

Permalink
build(installer): pass --destdir and --prefix conditionally (#343)
Browse files Browse the repository at this point in the history
Ensure PREFIX and DESTDIR are correctly passed to `python -m installer`

`--destdir` and `--prefix` should be used when the respective variable
is non-empty.
  • Loading branch information
MattSturgeon authored Jan 19, 2025
1 parent c94bf59 commit 602a2f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ DESTDIR ?=
USERINSTALL ?= xfalse
FLATPAK ?= xfalse

INSTALLER_ARGS := -m installer $(OBJDIR)/*.whl
ifdef DESTDIR
INSTALLER_ARGS += --destdir=$(DESTDIR)
endif
ifdef PREFIX
INSTALLER_ARGS += --prefix=$(PREFIX)
endif

.PHONY: all
ifeq ($(FLATPAK), xtrue)
all: umu-dist umu-launcher umu-vendored
Expand Down Expand Up @@ -63,7 +71,7 @@ umu-dist: $(OBJDIR)/.build-umu-dist
umu-dist-install: umu-dist
$(info :: Installing umu )
install -d $(DESTDIR)$(PYTHONDIR)/$(INSTALLDIR)
$(PYTHON_INTERPRETER) -m installer --destdir=$(DESTDIR) $(OBJDIR)/*.whl
$(PYTHON_INTERPRETER) $(INSTALLER_ARGS)

ifeq ($(FLATPAK), xtrue)
umu-install: umu-dist-install umu-delta-install
Expand Down

0 comments on commit 602a2f8

Please sign in to comment.