mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Running make with PYTHON=/usr/bin/python3 will build/install the bits for Python 3. Executable scripts in ipatests have symlinks Python version suffixes as per Fedora guidelines. Suffix-less names point to the Python 2 versions. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
26 lines
576 B
Makefile
26 lines
576 B
Makefile
PYTHON ?= /usr/bin/python2
|
|
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib())")
|
|
PYTHONVERSION ?= $(shell $(PYTHON) -c "import sys; print(sys.version_info[0])")
|
|
|
|
all:
|
|
if [ "$(PYTHONVERSION)" = "2" ]; then \
|
|
python2 setup.py build; \
|
|
fi
|
|
|
|
install:
|
|
# Skip this module under Python 3
|
|
if [ "$(PYTHONVERSION)" = "2" ]; then \
|
|
if [ "$(DESTDIR)" = "" ]; then \
|
|
python2 setup.py install; \
|
|
else \
|
|
python2 setup.py install --root $(DESTDIR); \
|
|
fi; \
|
|
fi
|
|
|
|
clean:
|
|
rm -rf build
|
|
|
|
distclean: clean
|
|
|
|
maintainer-clean: distclean
|