[Pkg-libvirt-commits] [Git][libvirt-team/libvirt-python][upstream/latest] New upstream version 11.8.0

Pino Toscano (@pino) gitlab at salsa.debian.org
Wed Oct 8 06:04:02 BST 2025



Pino Toscano pushed to branch upstream/latest at Libvirt Packaging Team / libvirt-python


Commits:
c350ae74 by Pino Toscano at 2025-10-08T07:01:20+02:00
New upstream version 11.8.0
- - - - -


6 changed files:

- ChangeLog
- Makefile
- PKG-INFO
- VERSION
- libvirt-python.spec
- setup.py


Changes:

=====================================
ChangeLog
=====================================
@@ -1,3 +1,38 @@
+ 2025- 9- 11 Jiri Denemark <jdenemar at redhat.com>
+    
+    spec: Set dist_name when creating a distribution tarball
+    When a distribution tarball is created (python3 -m build -n -s) the
+    dist_name in the spec file included in that tarball must match the
+    actual tarball name. The tarball name depends on the setuptools version
+    used to create it rather than on the version of setuptools installed on
+    the system RPMs are built.
+    
+    Fixes: ed8ab5075d9190fdcd2894412d2127ac2a1d9535
+    Reported-by: Daniel P. Berrangé <berrange at redhat.com>
+    
+    
+ 2025- 9- 11 Jiri Denemark <jdenemar at redhat.com>
+    
+    setup.py: Add support for multiple replacements in *.in
+    
+    
+ 2025- 9- 10 Jiri Denemark <jdenemar at redhat.com>
+    
+    build: Adapt to PEP 625 distribution file naming
+    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.
+    
+    Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
+    
+    
+ 2025- 9- 1 Jiri Denemark <jdenemar at redhat.com>
+    
+    Post-release version bump to 11.8.0
+    
+    
  2025- 8- 1 Jiri Denemark <jdenemar at redhat.com>
     
     Post-release version bump to 11.7.0


=====================================
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


=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: libvirt-python
-Version: 11.7.0
+Version: 11.8.0
 Summary: The libvirt virtualization API python binding
 Home-page: http://www.libvirt.org
 Maintainer: Libvirt Maintainers


=====================================
VERSION
=====================================
@@ -1 +1 @@
-11.7.0
+11.8.0


=====================================
libvirt-python.spec
=====================================
@@ -12,11 +12,13 @@
     %define supported_platform 0
 %endif
 
+%define dist_name libvirt_python
+
 Summary: The libvirt virtualization API python3 binding
 Name: libvirt-python
-Version: 11.7.0
+Version: 11.8.0
 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 +53,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


=====================================
setup.py
=====================================
@@ -189,16 +189,21 @@ class my_sdist(sdist):
         sdist.finalize_options(self)
 
     @staticmethod
-    def _gen_from_in(file_in, file_out, replace_pattern, replace):
+    def _gen_from_in(file_in, file_out, replacements):
         with open(file_in) as f_in, open(file_out, "w") as f_out:
             for line in f_in:
-                f_out.write(line.replace(replace_pattern, replace))
+                for pattern, replace in replacements.items():
+                    line = line.replace(pattern, replace)
+                f_out.write(line)
 
     def gen_rpm_spec(self):
+        full_name = self.distribution.get_fullname()
+        dist_name = full_name[:full_name.rfind("-")]
+
         return self._gen_from_in("libvirt-python.spec.in",
                                  "libvirt-python.spec",
-                                 "@VERSION@",
-                                 getVersion())
+                                 {"@VERSION@": getVersion(),
+                                  "@DIST_NAME@": dist_name})
 
     def gen_authors(self):
 
@@ -209,8 +214,7 @@ class my_sdist(sdist):
         authors = ["   " + author for author in authors]
         self._gen_from_in("AUTHORS.in",
                           "AUTHORS",
-                          "@AUTHORS@",
-                          "\n".join(authors))
+                          {"@AUTHORS@": "\n".join(authors)})
 
     def gen_changelog(self):
         cmd = ["git", "log", "--pretty=format:%H:%ct %an <%ae>%n%n%s%n%b%n"]



View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt-python/-/commit/c350ae7443e4fe0a01eefb2fe79282653f630119

-- 
View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt-python/-/commit/c350ae7443e4fe0a01eefb2fe79282653f630119
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20251008/63c3c3ae/attachment-0001.htm>


More information about the Pkg-libvirt-commits mailing list