Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-rpm-macros for 
openSUSE:Factory checked in at 2026-08-25 13:17:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old)
 and      /work/SRC/openSUSE:Factory/.python-rpm-macros.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rpm-macros"

Tue Aug 25 13:17:36 2026 rev:63 rq:1372870 version:20260821.08c5ec8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes      
2026-06-29 17:28:23.178004828 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-rpm-macros.new.1258/python-rpm-macros.changes
    2026-08-25 13:17:37.956763387 +0200
@@ -1,0 +2,19 @@
+Fri Aug 21 12:39:35 UTC 2026 - [email protected]
+
+- Update to version 20260821.08c5ec8:
+  * Use the primary interpreter for generic python3 macros
+  * Add python315 macros, remove python39
+
+-------------------------------------------------------------------
+Mon Jun 29 12:20:04 UTC 2026 - [email protected]
+
+- Update to version 20260629.bcd36db:
+  * don't use realpath to the interpreter binary
+  * doc: add a shot documentation text for %python_site{lib,arch}_module.
+  * Add initial pyproject declarative buildsystem
+  * fix: handle the situation when either `name` or `meta_name` is not found
+  * Consolidate site directory name normalization into %__python_sitedir_name
+  * Normalize the name of the directory
+  * Definitions of %python_site{lib,arch}_module macros.
+
+-------------------------------------------------------------------

Old:
----
  python-rpm-macros-20260601.4a231f4.tar.xz

New:
----
  python-rpm-macros-20260821.08c5ec8.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.AS5BxG/_old  2026-08-25 13:17:39.263809436 +0200
+++ /var/tmp/diff_new_pack.AS5BxG/_new  2026-08-25 13:17:39.264809471 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-rpm-macros
-Version:        20260601.4a231f4
+Version:        20260821.08c5ec8
 Release:        0
 Summary:        RPM macros for building of Python modules
 License:        WTFPL

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.AS5BxG/_old  2026-08-25 13:17:39.312811162 +0200
+++ /var/tmp/diff_new_pack.AS5BxG/_new  2026-08-25 13:17:39.315811268 +0200
@@ -1,6 +1,6 @@
-mtime: 1780582890
-commit: a5066d706e6cc04522775fd3ad65060e2d63bdb2ba625e95ee3ff33b16f9c6b9
+mtime: 1787317097
+commit: 7bfe67b9ed98463100a5108e9f88e9ec33abea7241c9b5769a8f5222f38dbbdc
 url: https://src.opensuse.org/python-interpreters/python-rpm-macros
-revision: a5066d706e6cc04522775fd3ad65060e2d63bdb2ba625e95ee3ff33b16f9c6b9
+revision: 7bfe67b9ed98463100a5108e9f88e9ec33abea7241c9b5769a8f5222f38dbbdc
 projectscmsync: https://src.opensuse.org/python-interpreters/_ObsPrj
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.AS5BxG/_old  2026-08-25 13:17:39.350812501 +0200
+++ /var/tmp/diff_new_pack.AS5BxG/_new  2026-08-25 13:17:39.352812572 +0200
@@ -3,5 +3,6 @@
                 <param 
name="url">git://github.com/openSUSE/python-rpm-macros.git</param>
               <param 
name="changesrevision">80d37568d9732beb7fcc2cf27c5c08f9c01fade1</param></service><service
 name="tar_scm">
                 <param 
name="url">https://github.com/openSUSE/python-rpm-macros.git</param>
-              <param 
name="changesrevision">4a231f4b9d4306c41f713ef31c60793e2c1729c8</param></service></servicedata>
+              <param 
name="changesrevision">08c5ec8da9157ba4621c71c6544b1b1c2a75d296</param></service></servicedata>
+(No newline at EOF)
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-08-21 14:58:17.000000000 +0200
@@ -0,0 +1,9 @@
+.assets
+_build.*
+*.obscpio
+*.obsinfo
+.osc
+.pbuild
+_service:*
+python-rpm-macros-*-build/
+python-rpm-macros/

++++++ python-rpm-macros-20260601.4a231f4.tar.xz -> 
python-rpm-macros-20260821.08c5ec8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20260601.4a231f4/README.md 
new/python-rpm-macros-20260821.08c5ec8/README.md
--- old/python-rpm-macros-20260601.4a231f4/README.md    2026-06-01 
12:23:34.000000000 +0200
+++ new/python-rpm-macros-20260821.08c5ec8/README.md    2026-08-21 
14:39:03.000000000 +0200
@@ -405,6 +405,18 @@
 
 Each of these has a flavor-specific spelling: `%python2_alternative` etc.
 
+#### %python_sitelib_module and %python_sitearch_module
+
+Generates paths for module and *-info directory in `%files` sections of
+SPEC files.
+
+Use `%python_sitearch_module` instead of
+
+```spec
+%{python_sitearch}/foo
+%{python_sitearch}/foo-%{version}*-info
+```
+
 
 ### Libalternatives-related:
 
@@ -577,6 +589,45 @@
 [openSUSE:Packaging 
Python](https://en.opensuse.org/openSUSE:Packaging_Python#Filelists)
 guidelines
 
+### Declarative build system
+
+The macros defines a new 
[buildsystem](https://rpm-software-management.github.io/rpm/manual/buildsystem.html)
+to use for python packaging.
+
+You can use the `pyproject` buildsystem in your spec file to simplify:
+
+```
+BuildSystem: pyproject
+```
+
+This buildsystem defines the `%build`, `%install` and `%check`
+sections with default calls to `%pyproject_wheel`,
+`%pyproject_install` and `%pytest`.
+
+These sections can be extended using `-a` to append or `-p` to prepend
+commands, or completely overwritten using the default tag.
+
+```
+# Extend prep
+%prep -a
+rm -rf not-needed-file
+
+# Extend build prepending commands
+%build -p
+export CFLAGS="$CFLAGS -g"
+
+# Extend install
+%install -a
+%python_clone -a %{buildroot}/%{_bindir}/cmd1
+%python_clone -a %{buildroot}/%{_binddir}/cmd2
+%python_clone -a %{buildroot}/%{_mandir}/man1/cmd1.1
+%python_group_libalternatives cmd1 cmd2
+
+# Replace default check
+%check
+%pytest_arch -k "network"
+```
+
 ### Files in Repository
 
 #### `macros` directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20260601.4a231f4/compile-macros.sh 
new/python-rpm-macros-20260821.08c5ec8/compile-macros.sh
--- old/python-rpm-macros-20260601.4a231f4/compile-macros.sh    2026-06-01 
12:23:34.000000000 +0200
+++ new/python-rpm-macros-20260821.08c5ec8/compile-macros.sh    2026-08-21 
14:39:03.000000000 +0200
@@ -2,7 +2,7 @@
 
 # The set of flavors for which we produce macros. Not identical to
 # the buildset predefined for specific distributions (see below)
-FLAVORS="python2 python3 python39 python310 python311 python312 python313 
python314 pypy3"
+FLAVORS="python2 python3 python310 python311 python312 python313 python314 
python315 pypy3"
 
 ### flavor-specific: generate from flavor.in
 for flavor in $FLAVORS; do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20260601.4a231f4/flavor.in 
new/python-rpm-macros-20260821.08c5ec8/flavor.in
--- old/python-rpm-macros-20260601.4a231f4/flavor.in    2026-06-01 
12:23:34.000000000 +0200
+++ new/python-rpm-macros-20260821.08c5ec8/flavor.in    2026-08-21 
14:39:03.000000000 +0200
@@ -2,7 +2,7 @@
 
 %#FLAVOR#_shbang_opts     %py_shbang_opts
 
-%__#FLAVOR#               %{_bindir}/%{lua: print((string.gsub("#FLAVOR#", 
"(%a+%d)(%d+)", "%1.%2")))}
+%__#FLAVOR#               %{_bindir}/%{lua: local flavor = "#FLAVOR#"; if 
flavor == "python3" then flavor = rpm.expand("%{primary_python}") end; 
print((string.gsub(flavor, "(%a+%d)(%d+)", "%1.%2")))}
 
 %#FLAVOR#_prefix          #FLAVOR#
 %#FLAVOR#_sitelib         %{_python_sysconfig_path %__#FLAVOR# purelib}
@@ -123,13 +123,21 @@
 
 
%#FLAVOR#_fix_shebang_path(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 \
 myargs="%{**}" \
+_pyexec="%__#FLAVOR#" \
+case "${_pyexec}" in \
+  */python3) \
+    _v="$(rpm -E '%{primary_python}')" \
+    _v="${_v#python}" \
+    _pyexec=$(printf "%{_bindir}/python%s.%s" "${_v%${_v#?}}" "${_v#?}") \
+    ;; \
+esac \
 for f in ${myargs}; do \
   if [ -f "$f" -a  -x "$f" -a -w "$f" ] \
   then \
     # in i586, sed fails when following symlinks to long paths, so \
     # changing to the target directory avoid this problem \
     cd "$(dirname "$f")" \
-    sed -i --follow-symlinks "1s@#\\!.*python\\S*@#\\!$(realpath 
%__#FLAVOR#)@" "$(basename "$f")" \
+    sed -i --follow-symlinks "1s@#\\!.*python\\S*@#\\!${_pyexec}@" "$(basename 
"$f")" \
     cd - \
   fi \
 done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20260601.4a231f4/macros/010-common-defs 
new/python-rpm-macros-20260821.08c5ec8/macros/010-common-defs
--- old/python-rpm-macros-20260601.4a231f4/macros/010-common-defs       
2026-06-01 12:23:34.000000000 +0200
+++ new/python-rpm-macros-20260821.08c5ec8/macros/010-common-defs       
2026-08-21 14:39:03.000000000 +0200
@@ -68,6 +68,41 @@
 # this is by convention hardcoded python2
 %py_ver  %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 
2>/dev/null || echo PYTHON-NOT-FOUND)
 
+%__python_sitedir_name() %{lua:\
+        name = rpm.expand("%{?1:%{1}}");\
+        if (name == nil or name == "") then\
+            name = rpm.expand("%{?mod_name:%{mod_name}}");\
+            if (name == nil or name == "") then\
+                name = rpm.expand("%{?name:%{name}}");\
+            end\
+        end\
+        if (name == nil or name == "") then\
+            rpm.expand("%{error:failed to determine module/dist name}");\
+            return;\
+        end\
+        meta_name = string.gsub(string.lower(name), "[-_.]+", "_");\
+        print(name .. " " .. meta_name);\
+    }
+
+%python_sitelib_module() %{lua:\
+        res = rpm.expand("%__python_sitedir_name %{?1}");\
+        name, meta_name = res:match("(%S+) (%S+)");\
+        sitedir = rpm.expand("%{python_sitelib}");\
+        version = rpm.expand("%{version}");\
+        print(sitedir .. "/" .. name .. string.char(10));\
+        print(sitedir .. "/" .. meta_name .. "-" .. version .. "*-info");\
+    }
+
+%python_sitearch_module() %{lua:\
+        res = rpm.expand("%__python_sitedir_name %{?1}");\
+        name, meta_name = res:match("(%S+) (%S+)");\
+        sitedir = rpm.expand("%{python_sitearch}");\
+        version = rpm.expand("%{version}");\
+        print(sitedir .. "/" .. name .. string.char(10));\
+        print(sitedir .. "/" .. meta_name .. "-" .. version .. "*-info");\
+    }
+
+
 ##### Python dependency generator macros #####
 
 # === Macros for Build/Requires tags using Python dist tags ===
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20260601.4a231f4/macros/060-buildsystem 
new/python-rpm-macros-20260821.08c5ec8/macros/060-buildsystem
--- old/python-rpm-macros-20260601.4a231f4/macros/060-buildsystem       
1970-01-01 01:00:00.000000000 +0100
+++ new/python-rpm-macros-20260821.08c5ec8/macros/060-buildsystem       
2026-08-21 14:39:03.000000000 +0200
@@ -0,0 +1,7 @@
+# Declarative buildsystem, requires RPM 4.20+ to work
+# https://rpm-software-management.github.io/rpm/manual/buildsystem.html
+%buildsystem_pyproject_conf() %nil
+%buildsystem_pyproject_build() %pyproject_wheel %*
+%buildsystem_pyproject_install() %pyproject_install %*
+%buildsystem_pyproject_check() %pytest %*
+%buildsystem_pyproject_generate_buildrequires() %{nil}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20260601.4a231f4/testfiles/declarative.spec 
new/python-rpm-macros-20260821.08c5ec8/testfiles/declarative.spec
--- old/python-rpm-macros-20260601.4a231f4/testfiles/declarative.spec   
1970-01-01 01:00:00.000000000 +0100
+++ new/python-rpm-macros-20260821.08c5ec8/testfiles/declarative.spec   
2026-08-21 14:39:03.000000000 +0200
@@ -0,0 +1,49 @@
+#
+# spec file for package declarative-01
+#
+# Copyright (c) 2025 SUSE LLC and contributors
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+%bcond_without libalternatives
+Name:           declarative
+Version:        1.0
+Release:        0
+Summary:        Declarative
+License:        MIT
+URL:            http://example.com
+Source0:        declarative.tar.gz
+BuildRequires:  python-rpm-macros
+BuildRequires:  pytest
+BuildRequires:  alts
+Requires:       alts
+
+BuildSystem:    pyproject
+
+%python_subpackages
+
+%description
+Declarative test
+
+%install -a
+%python_clone -a %{buildroot}/%{_bindir}/cmd1
+
+%files %{python_files}
+%license LICENSE
+%doc README.md
+%python_alternative %{_bindir}/cmd1
+%{python_sitelib}/test
+%{python_sitelib}/test-%{version}*-info
+
+%changelog
+

Reply via email to