use macro to support RHEL8 build

Related: #986
This commit is contained in:
Franz Chih-Ping Hsieh 2018-07-09 06:42:06 -04:00 committed by Mike McLean
parent ccdb8ac34c
commit 42f5988dc3
2 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,4 @@
PYMAJORVER := $(shell $(PYTHON) -c 'import sys; print(sys.version_info[0])')
PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))')
PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)')
PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
@ -28,7 +29,7 @@ install:
echo "ERROR: A destdir is required"; \
exit 1; \
fi
if [ "$(PYTHON)" == "python2" ] ; then \
if [ "$(PYMAJORVER)" == "2" ] ; then \
mkdir -p $(DESTDIR)/$(HUBPLUGINDIR); \
mkdir -p $(DESTDIR)/$(BUILDERPLUGINDIR); \
install -p -m 644 $(HUBFILES) $(DESTDIR)/$(HUBPLUGINDIR); \