From a701cf05e39f481c07f6ac062807c8fbed375a1d Mon Sep 17 00:00:00 2001 From: Sergey Cherevko Date: Mon, 4 Dec 2023 18:41:33 +0300 Subject: [PATCH] Added dependency for build and defined %__python explicitly --- SPECS/python-cups.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/SPECS/python-cups.spec b/SPECS/python-cups.spec index a0e831a..ec5dd8c 100644 --- a/SPECS/python-cups.spec +++ b/SPECS/python-cups.spec @@ -1,3 +1,5 @@ +%global __python /usr/bin/python3 + %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup @@ -6,13 +8,14 @@ Summary: Python bindings for CUPS Name: python-cups Version: 1.9.72 -Release: 21%{?dist} +Release: 21%{?dist}.inferit URL: http://cyberelk.net/tim/software/pycups/ Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2 License: GPLv2+ # gcc is no longer in buildroot by default BuildRequires: gcc +BuildRequires: python3 BuildRequires: cups-devel %if 0%{?rhel} <= 7 @@ -25,7 +28,7 @@ This package provides Python bindings for CUPS API, known as pycups. It was written for use with system-config-printer, but can be put to other uses as well. -%if 0%{?rhel} <= 7 +%if 0%{?msvsphere} <= 7 %package -n python2-cups Summary: Python2 bindings for CUPS API, known as pycups. # defined in /usr/lib/rpm/macros.d/macros.python @@ -62,14 +65,14 @@ sed -i '1s=^#!/usr/bin/python3=#!%{__python3}=' \ postscriptdriver.prov %build -%if 0%{?rhel} <= 7 +%if 0%{?msvsphere} <= 7 %py2_build %endif %py3_build %install make install-rpmhook DESTDIR="%{buildroot}" -%if 0%{?rhel} <= 7 +%if 0%{?msvsphere} <= 7 %py2_install %endif %py3_install @@ -78,7 +81,7 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch} %{_bindir}/mkdir html %{_bindir}/mv cups.html html -%if 0%{?rhel} <= 7 +%if 0%{?msvsphere} <= 7 %files -n python2-cups %doc README NEWS TODO %license COPYING @@ -98,7 +101,8 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch} %doc examples html %changelog -* Wed Jul 26 2023 MSVSphere Packaging Team - 1.9.72-21 +* Mon Dec 04 2023 Sergey Cherevko - 1.9.72-21.inferit +- Added dependency for build and defined %__python explicitly - Rebuilt for MSVSphere 8.8 * Thu Jun 07 2018 Tomas Orsava - 1.9.72-21