#990 use macro to support RHEL8 build
Closed 5 years ago by mikem. Opened 5 years ago by franzh.
franzh/koji issue986  into  master

file modified
+4 -4
@@ -268,14 +268,14 @@ 

  

  %install

  rm -rf $RPM_BUILD_ROOT

- make DESTDIR=$RPM_BUILD_ROOT %{?install_opt} install

+ make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} %{?install_opt} install

  %if 0%{with python3}

  cd koji

- make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install

+ make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install

  cd ../cli

- make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install

+ make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install

  cd ../plugins

- make DESTDIR=$RPM_BUILD_ROOT PYTHON=python3 %{?install_opt} install

+ make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install

  # alter python interpreter in koji CLI

  sed -i 's/\#\!\/usr\/bin\/python2/\#\!\/usr\/bin\/python3/' $RPM_BUILD_ROOT/usr/bin/koji

  %endif

file modified
+2 -1
@@ -1,4 +1,5 @@ 

  PYTHON=python

+ 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)
@@ -29,7 +30,7 @@ 

  		echo "ERROR: A destdir is required"; \

  		exit 1; \

  	fi

- 	if [ "$(PYTHON)" == "python" ] ; then \

+ 	if [ "$(PYMAJORVER)" == "2" ] ; then \

  		mkdir -p $(DESTDIR)/$(HUBPLUGINDIR); \

  		mkdir -p $(DESTDIR)/$(BUILDERPLUGINDIR); \

  		install -p -m 644 $(HUBFILES) $(DESTDIR)/$(HUBPLUGINDIR); \

no initial comment

rebased onto e3d3fbe

5 years ago

included in #1019, so closing this one

Pull-Request has been closed by mikem

5 years ago