From 029f560334b425363488a226e4dc621eb4e01eca Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Aug 26 2017 14:36:08 +0000 Subject: [PATCH 1/3] packaging: remove unneeded python2 macro Signed-off-by: Igor Gnatenko --- diff --git a/koji.spec b/koji.spec index 943d12e..bfea647 100644 --- a/koji.spec +++ b/koji.spec @@ -7,15 +7,6 @@ %bcond_with python3 %endif -# Compatibility with RHEL. These macros have been added to EPEL but -# not yet to RHEL proper. -# https://bugzilla.redhat.com/show_bug.cgi?id=1307190 -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} -%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} - %if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 %global use_systemd 1 %else From c9808814ad8fcf7e24b5d61169a41c38386d8841 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Aug 26 2017 14:38:07 +0000 Subject: [PATCH 2/3] packaging: use python-rpm names by default F24 is dead, so no need to conditionalize on fedora. Signed-off-by: Igor Gnatenko --- diff --git a/koji.spec b/koji.spec index bfea647..43bee81 100644 --- a/koji.spec +++ b/koji.spec @@ -55,10 +55,10 @@ Summary: Build system tools python library %{?python_provide:%python_provide python2-%{name}} BuildRequires: python-devel Requires: python-krbV >= 1.0.13 -%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 -Requires: python2-rpm -%else +%if 0%{?rhel} && 0%{?rhel} <= 7 Requires: rpm-python +%else +Requires: python2-rpm %endif Requires: pyOpenSSL Requires: python-pycurl @@ -75,10 +75,10 @@ desc Summary: Build system tools python library %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} BuildRequires: python%{python3_pkgversion}-devel -%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 -Requires: python%{python3_pkgversion}-rpm -%else +%if 0%{?rhel} && 0%{?rhel} <= 7 Requires: rpm-python%{python3_pkgversion} +%else +Requires: python%{python3_pkgversion}-rpm %endif Requires: python%{python3_pkgversion}-pycurl Requires: python%{python3_pkgversion}-pyOpenSSL From 070e848b798a956050191114991d7b6c7312c716 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Aug 26 2017 14:45:20 +0000 Subject: [PATCH 3/3] packaging: use python2- prefix where applicable Signed-off-by: Igor Gnatenko --- diff --git a/koji.spec b/koji.spec index 43bee81..9cd5ff1 100644 --- a/koji.spec +++ b/koji.spec @@ -53,19 +53,25 @@ contains shared libraries and the command-line interface. %package -n python2-%{name} Summary: Build system tools python library %{?python_provide:%python_provide python2-%{name}} -BuildRequires: python-devel +BuildRequires: python2-devel Requires: python-krbV >= 1.0.13 %if 0%{?rhel} && 0%{?rhel} <= 7 Requires: rpm-python -%else -Requires: python2-rpm -%endif Requires: pyOpenSSL Requires: python-pycurl Requires: python-requests Requires: python-requests-kerberos Requires: python-dateutil Requires: python-six +%else +Requires: python2-rpm +Requires: python2-pyOpenSSL +Requires: python2-pycurl +Requires: python2-requests +Requires: python2-requests-kerberos +Requires: python2-dateutil +Requires: python2-six +%endif %description -n python2-%{name} desc