From 5c288a27ddd78181e9de52f46b348d79460335e3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 4 Oct 2019 10:54:20 -0400 Subject: [PATCH] Have EL8 use python3 for confluent --- confluent_client/confluent_client.spec.tmpl | 8 ++++++++ confluent_server/confluent_server.spec.tmpl | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/confluent_client/confluent_client.spec.tmpl b/confluent_client/confluent_client.spec.tmpl index 68e045a4..d6a2ebf9 100644 --- a/confluent_client/confluent_client.spec.tmpl +++ b/confluent_client/confluent_client.spec.tmpl @@ -24,10 +24,18 @@ a confluent server. %setup -n %{name}-%{version} -n %{name}-%{version} %build +%if "%{dist}" == ".el8" +python3 setup.py build +%else python2 setup.py build +%endif %install +%if "%{dist}" == ".el8" +python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --install-scripts=/opt/confluent/bin --install-purelib=/opt/confluent/lib/python +%else python2 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --install-scripts=/opt/confluent/bin --install-purelib=/opt/confluent/lib/python +%endif %clean diff --git a/confluent_server/confluent_server.spec.tmpl b/confluent_server/confluent_server.spec.tmpl index 85a78c7f..5efc0d3d 100644 --- a/confluent_server/confluent_server.spec.tmpl +++ b/confluent_server/confluent_server.spec.tmpl @@ -13,7 +13,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch %if "%{dist}" == ".el8" -Requires: python2-pyghmi >= 1.0.34, python2-eventlet, python2-greenlet, python2-pycryptodomex >= 3.4.7, confluent_client, python2-pyparsing, python2-paramiko, python2-dns, python2-netifaces, python2-pyasn1 >= 0.2.3, python2-pysnmp >= 4.3.4, python2-pyte, python2-lxml, python2-eficompressor, python2-setuptools, python2-dateutil, python2-enum34, python2-asn1crypto, python2-ipaddress, python2-cffi, python2-pyOpenSSL +Requires: python3-pyghmi >= 1.0.34, python3-eventlet, python3-greenlet, python3-pycryptodomex >= 3.4.7, confluent_client, python3-pyparsing, python3-paramiko, python3-dns, python3-netifaces, python3-pyasn1 >= 0.2.3, python3-pysnmp >= 4.3.4, python3-pyte, python3-lxml, python3-eficompressor, python3-setuptools, python3-dateutil, python3-enum34, python3-asn1crypto, python3-ipaddress, python3-cffi, python3-pyOpenSSL %else Requires: python-pyghmi >= 1.0.34, python-eventlet, python-greenlet, python-pycryptodomex >= 3.4.7, confluent_client, python-pyparsing, python-paramiko, python-dns, python-netifaces, python2-pyasn1 >= 0.2.3, python-pysnmp >= 4.3.4, python-pyte, python-lxml, python-eficompressor, python-setuptools, python-dateutil %endif @@ -27,10 +27,18 @@ Server for console management and systems management aggregation %setup -n %{name}-%{version} -n %{name}-%{version} %build +%if "%{dist}" == ".el8" +python3 setup.py build +%else python2 setup.py build +%endif %install +%if "%{dist}" == ".el8" +python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES.bare --install-purelib=/opt/confluent/lib/python --install-scripts=/opt/confluent/bin +%else python2 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES.bare --install-purelib=/opt/confluent/lib/python --install-scripts=/opt/confluent/bin +%endif for file in $(grep confluent/__init__.py INSTALLED_FILES.bare); do rm $RPM_BUILD_ROOT/$file done