
The version of setuptools shipped by Fedora 42 is PEP 625 compliant, which requires distribution files to contain a normalized package name. Thus the generated tarball is called libvirt_python-$VER.tar.gz rather than libvirt-python-$VER.tar.gz created by older setuptools. The source directory inside the tarball follows the same naming. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- .gitlab-ci.yml | 4 ++-- Makefile | 2 +- libvirt-python.spec.in | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc4ff48..1267c47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ stages: - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then unset CFLAGS ; - rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ; + rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt[-_]python*tar.gz ; mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ; fi @@ -51,7 +51,7 @@ stages: - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then unset CFLAGS ; - rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ; + rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt[-_]python*tar.gz ; mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ; fi diff --git a/Makefile b/Makefile index 925af40..0b2af28 100644 --- a/Makefile +++ b/Makefile @@ -19,4 +19,4 @@ test: all tox rpm: all - rpmbuild -ta dist/libvirt-python-$(shell tr -d '\n' < VERSION).tar.gz + rpmbuild -ta dist/libvirt[-_]python-$(shell tr -d '\n' < VERSION).tar.gz diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index e260eaf..dd0c71b 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -12,11 +12,17 @@ %define supported_platform 0 %endif +%if 0%{?rhel} || 0%{?fedora} < 42 + %define dist_name %{name} +%else + %define dist_name libvirt_python +%endif + Summary: The libvirt virtualization API python3 binding Name: libvirt-python Version: @VERSION@ Release: 1%{?dist} -Source0: https://libvirt.org/sources/python/%{name}-%{version}.tar.gz +Source0: https://libvirt.org/sources/python/%{dist_name}-%{version}.tar.gz Url: https://libvirt.org License: LGPL-2.1-or-later BuildRequires: libvirt-devel == %{version} @@ -51,7 +57,7 @@ supplied by the libvirt library to use the virtualization capabilities of recent versions of Linux (and other OSes). %prep -%setup -q +%setup -q -n %{dist_name}-%{version} # Unset execute bit for example scripts; it can introduce spurious # RPM dependencies, like /usr/bin/python3 -- 2.51.0