From 5f65cf63b7d0822b6fdc7f93c96122929b10fcc3 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Aug 06 2021 08:51:09 +0000 Subject: fix python version parsing for py 3.10 Fixes: https://pagure.io/koji/issue/2975 --- diff --git a/builder/Makefile b/builder/Makefile index 80a46cd..89656ed 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -1,4 +1,4 @@ -PYVER := $(shell $(PYTHON) -c 'import sys; print("%.1s" %(sys.version))') +PYVER_MAJOR := $(shell $(PYTHON) -c 'import sys; print(".".join(sys.version.split(".")[:1]))') BINFILES = kojid LIBEXECFILES = mergerepos @@ -22,7 +22,7 @@ _install: mkdir -p $(DESTDIR)/usr/sbin install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin - @if [ "$(PYVER)" -lt 3 ] ; then \ + @if [ "$(PYVER_MAJOR)" -lt 3 ] ; then \ mkdir -p $(DESTDIR)/usr/libexec/kojid; \ install -p -m 755 $(LIBEXECFILES) $(DESTDIR)/usr/libexec/kojid; \ fi