Skip to content

Commit

Permalink
Make python3 binary configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
waveform80 committed Mar 28, 2024
1 parent 8c66cad commit 19d287a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SIZE = $(CROSS_PREFIX)size
STRIP = $(CROSS_PREFIX)strip
SHLIB = $(CC) -shared
STRIPLIB = $(STRIP) --strip-unneeded
PYTHON ?= python3

SOVERSION = 1

Expand Down Expand Up @@ -134,11 +135,11 @@ install: $(ALL)
ifeq ($(DESTDIR),)
ldconfig
endif
@if which python3; then cd PY_RGPIO && python3 setup.py -q install $(PYINSTALLARGS) || echo "*** install of Python3 rgpio.py failed ***"; fi
@if which swig python3; then \
@if which $(PYTHON); then cd PY_RGPIO && $(PYTHON) setup.py -q install $(PYINSTALLARGS) || echo "*** install of Python3 rgpio.py failed ***"; fi
@if which swig $(PYTHON); then \
cd PY_LGPIO && \
python3 setup.py build_ext $(PYBUILDARGS) && \
python3 setup.py -q install $(PYINSTALLARGS) || \
$(PYTHON) setup.py build_ext $(PYBUILDARGS) && \
$(PYTHON) setup.py -q install $(PYINSTALLARGS) || \
echo "*** install of Python3 lgpio.py failed ***"; \
fi

Expand Down

0 comments on commit 19d287a

Please sign in to comment.