Skip to content

Commit

Permalink
spec: add python3.12 package
Browse files Browse the repository at this point in the history
Add a python3.12 version of the ovirt-engine-sdk-python.

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
  • Loading branch information
dupondje committed Jan 24, 2025
1 parent bb13a51 commit 9b5337d
Showing 1 changed file with 15 additions and 31 deletions.
46 changes: 15 additions & 31 deletions python-ovirt-engine-sdk4.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Requires: python3-six
This package contains the Python 3 SDK for version 4 of the oVirt Engine
API.

%if 0%{?rhel} >= 9
%package -n python3.11-ovirt-engine-sdk4
Summary: oVirt Engine Software Development Kit (Python)
BuildRequires: python3.11-devel
Expand All @@ -40,22 +39,19 @@ Requires: python3.11-six
%description -n python3.11-ovirt-engine-sdk4
This package contains the Python 3.11 SDK for version 4 of the oVirt Engine
API.
%endif

%if 0%{?rhel} < 9
%package -n python3.11-ovirt-engine-sdk4
%package -n python3.12-ovirt-engine-sdk4
Summary: oVirt Engine Software Development Kit (Python)
BuildRequires: python3.11-devel
BuildRequires: python3.11-setuptools
BuildRequires: python3.12-devel
BuildRequires: python3.12-setuptools
Requires: libxml2
Requires: python3.11
Requires: python3.11-pycurl >= 7.43.0-6
Requires: python3.11-six
Requires: python3.12
Requires: python3.12-pycurl >= 7.43.0-6
Requires: python3.12-six

%description -n python3.11-ovirt-engine-sdk4
This package contains the Python 3.11 SDK for version 4 of the oVirt Engine
%description -n python3.12-ovirt-engine-sdk4
This package contains the Python 3.12 SDK for version 4 of the oVirt Engine
API.
%endif

%prep
%setup -c -q -n ovirt-engine-sdk-python-@PACKAGE_VERSION@
Expand All @@ -64,31 +60,23 @@ API.
%define python3_pkgversion 3
%define __python3 /usr/bin/python3
%py3_build
%if 0%{?rhel} < 9
%define python3_pkgversion 3.11
%define __python3 /usr/bin/python3.11
%py3_build
%endif
%if 0%{?rhel} >= 9
%define python3_pkgversion 3.11
%define __python3 /usr/bin/python3.11
%define python3_pkgversion 3.12
%define __python3 /usr/bin/python3.12
%py3_build
%endif

%install
%define python3_pkgversion 3
%define __python3 /usr/bin/python3
%py3_install
%if 0%{?rhel} < 9
%define python3_pkgversion 3.11
%define __python3 /usr/bin/python3.11
%py3_install
%endif
%if 0%{?rhel} >= 9
%define python3_pkgversion 3.11
%define __python3 /usr/bin/python3.11
%define python3_pkgversion 3.12
%define __python3 /usr/bin/python3.12
%py3_install
%endif

%files -n python3-ovirt-engine-sdk4
%doc README.adoc
Expand All @@ -98,25 +86,21 @@ API.
%define __python3 /usr/bin/python3
%{python3_sitearch}/*

%if 0%{?rhel} < 9
%files -n python3.11-ovirt-engine-sdk4
%doc README.adoc
%doc examples
%license LICENSE.txt
%define python3_pkgversion 3.11
%define __python3 /usr/bin/python3.11
%{python3_sitearch}/*
%endif

%if 0%{?rhel} >= 9
%files -n python3.11-ovirt-engine-sdk4
%files -n python3.12-ovirt-engine-sdk4
%doc README.adoc
%doc examples
%license LICENSE.txt
%define python3_pkgversion 3.11
%define __python3 /usr/bin/python3.11
%define python3_pkgversion 3.12
%define __python3 /usr/bin/python3.12
%{python3_sitearch}/*
%endif

%changelog
* Thu Mar 23 2023 Martin Necas <mnecas@redhat.com> - 4.6.2-1
Expand Down

0 comments on commit 9b5337d

Please sign in to comment.