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 2022-06-15 00:31:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old)
 and      /work/SRC/openSUSE:Factory/.python-rpm-macros.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rpm-macros"

Wed Jun 15 00:31:53 2022 rev:40 rq:982055 version:20220610.6dc4cb8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes      
2022-01-07 12:45:51.799823879 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-rpm-macros.new.1548/python-rpm-macros.changes
    2022-06-15 00:31:55.262493124 +0200
@@ -1,0 +2,20 @@
+Fri Jun 10 15:52:23 UTC 2022 - [email protected]
+
+- Update to version 20220610.6dc4cb8:
+  * create python_flavored_alternatives and use for testing
+
+-------------------------------------------------------------------
+Thu May 05 14:44:30 UTC 2022 - [email protected]
+
+- Update to version 20220505.4ab53ec:
+  * Switch primary_interpreter from python38 to python310
+  * Avoid bashism in %()
+  * fix flavor executable substitution
+  * Keep python38 as primary python3
+  * Add python310 to the buildset
+  * Move python39 to the primary place in %pythons
+  * Disable python36 flavor in Factory buildset
+  * Add python310 flavor macros to compile set
+  * no newline after python_install_alternative
+
+-------------------------------------------------------------------

Old:
----
  python-rpm-macros-20220106.80d3756.tar.xz

New:
----
  python-rpm-macros-20220610.6dc4cb8.tar.xz

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

Other differences:
------------------
++++++ python-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.pIBGHh/_old  2022-06-15 00:31:55.886494041 +0200
+++ /var/tmp/diff_new_pack.pIBGHh/_new  2022-06-15 00:31:55.890494046 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-rpm-macros
-Version:        20220106.80d3756
+Version:        20220610.6dc4cb8
 Release:        0
 Summary:        RPM macros for building of Python modules
 License:        WTFPL

++++++ _service ++++++
--- /var/tmp/diff_new_pack.pIBGHh/_old  2022-06-15 00:31:55.926494099 +0200
+++ /var/tmp/diff_new_pack.pIBGHh/_new  2022-06-15 00:31:55.930494105 +0200
@@ -1,6 +1,6 @@
 <services>
   <service mode="disabled" name="tar_scm">
-    <param name="url">git://github.com/openSUSE/python-rpm-macros.git</param>
+    <param name="url">https://github.com/openSUSE/python-rpm-macros.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
     <param name="revision">master</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.pIBGHh/_old  2022-06-15 00:31:55.950494135 +0200
+++ /var/tmp/diff_new_pack.pIBGHh/_new  2022-06-15 00:31:55.954494140 +0200
@@ -1,6 +1,8 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">git://github.com/openSUSE/python-rpm-macros.git</param>
-              <param 
name="changesrevision">80d37568d9732beb7fcc2cf27c5c08f9c01fade1</param></service></servicedata>
+              <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">6dc4cb823adc9bea302f2dba0e9c901d61abbc25</param></service></servicedata>
 (No newline at EOF)
 

++++++ python-rpm-macros-20220106.80d3756.tar.xz -> 
python-rpm-macros-20220610.6dc4cb8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20220106.80d3756/README.md 
new/python-rpm-macros-20220610.6dc4cb8/README.md
--- old/python-rpm-macros-20220106.80d3756/README.md    2022-01-06 
09:15:09.000000000 +0100
+++ new/python-rpm-macros-20220610.6dc4cb8/README.md    2022-06-10 
17:51:52.000000000 +0200
@@ -292,7 +292,7 @@
 Note that if you created a group by specifying multiple arguments to 
`install_alternative`, only
 the first one applies for `uninstall_alternative`.
 
-  Each of these has a flavor-specific spelling: `%python2_alternative` etc.
+Each of these has a flavor-specific spelling: `%python2_alternative` etc.
 
 
 #### Libalternatives-related:
@@ -332,6 +332,23 @@
   ```
   The argument *\<name\>* is the same used for calling 
*%python_uninstall_alternative*.
 
+#### Building and testing with flavored alternatives
+
+* __`%python_flavored_alternatives`__: If a build tool or a test
+  suite calls commands, which exist in several alternatives, and
+  you need them to call the command in the alternative of the
+  current flavor within an `%python_expand` block, this macro
+
+  - creates the appropriate update-alternatives symlinks in the
+    shuffled `build/flavorbin` directory and sets `$PATH`
+    accordingly, and
+  - selects the libalternatives priority of all installed commands
+    with a `libalternatives.conf` in
+    `XDG_CONFIG_HOME=$PWD/build/xdgflavorconfig`.
+
+  The `%pytest(_arch)` and `%pyunittest(_arch)` macros include a call
+  of this macro before expanding to the test suite execution.
+
 #### Flavor-specific macros  
 
 In addition, the following flavor-specific macros are known and supported by 
the configuration:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20220106.80d3756/default-prjconf 
new/python-rpm-macros-20220610.6dc4cb8/default-prjconf
--- old/python-rpm-macros-20220106.80d3756/default-prjconf      2022-01-06 
09:15:09.000000000 +0100
+++ new/python-rpm-macros-20220610.6dc4cb8/default-prjconf      2022-06-10 
17:51:52.000000000 +0200
@@ -7,7 +7,7 @@
 ## PYTHON MACROS BEGIN
 # order of %pythons is important: The last flavor overrides any operation on 
conflicting files and definitions during expansions,
 # making it the "default" in many cases --> keep the primary python3 provider 
at the end.
-%pythons %{?!skip_python3:%{?!skip_python39:python39} 
%{?!skip_python310:python310} %{?!skip_python38:python38}}
+%pythons %{?!skip_python3:%{?!skip_python39:python39} 
%{?!skip_python38:python38} %{?!skip_python310:python310}}
 %add_python() %{expand:%%define pythons %1 %pythons}
 
 %_without_python2 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-rpm-macros-20220106.80d3756/flavor.in 
new/python-rpm-macros-20220610.6dc4cb8/flavor.in
--- old/python-rpm-macros-20220106.80d3756/flavor.in    2022-01-06 
09:15:09.000000000 +0100
+++ new/python-rpm-macros-20220610.6dc4cb8/flavor.in    2022-06-10 
17:51:52.000000000 +0200
@@ -19,7 +19,7 @@
 %#FLAVOR#_provides %(provides=""; \
 for flavorbin in %{_bindir}/python?; do \
   if [ $flavorbin != %__#FLAVOR# -a $(realpath $flavorbin) = %__#FLAVOR# ]; 
then \
-    provides+=" $(basename $flavorbin)"; \
+    provides="$provides $(basename $flavorbin)"; \
   fi; \
 done; \
 echo ${provides# }; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20220106.80d3756/macros/001-alternatives 
new/python-rpm-macros-20220610.6dc4cb8/macros/001-alternatives
--- old/python-rpm-macros-20220106.80d3756/macros/001-alternatives      
2022-01-06 09:15:09.000000000 +0100
+++ new/python-rpm-macros-20220610.6dc4cb8/macros/001-alternatives      
2022-06-10 17:51:52.000000000 +0200
@@ -48,3 +48,29 @@
 %alternative_for() \
 %1 \
 %ghost %{_sysconfdir}/alternatives/%{basename:%1}
+
+%python_flavored_alternatives \
+%{python_expand # provide libalternatives and update-alternatives in the 
current flavor version when shuffling the build dir \
+mkdir -p build/xdgflavorconfig \
+export XDG_CONFIG_HOME=$PWD/build/xdgflavorconfig \
+if [ -d /usr/share/libalternatives/ ]; then \
+  for b in /usr/share/libalternatives/*; do \
+    if [ -e "${b}/%{$python_version_nodots}.conf" ]; then \
+        alts -n $(basename ${b}) -p %{$python_version_nodots} \
+    fi \
+  done \
+fi \
+mkdir -p build/flavorbin \
+for bin in %{_bindir}/*-%{$python_bin_suffix} 
%{buildroot}%{_bindir}/*-%{$python_bin_suffix}; do \
+  if [ -x "${bin}" ]; then \
+    # four percent into 1 by rpm/python expansions \
+    mainbin="${bin%%%%-%{$python_bin_suffix}}" \
+    basemain="$(basename ${mainbin})" \
+    if [ "$(readlink ${mainbin})" = "/etc/alternatives/${basemain}" ]; then \
+      ln -sf "${bin}" "build/flavorbin/${basemain}" \
+    fi \
+  fi \
+done \
+} \
+export PATH=$PWD/build/flavorbin:$PATH \
+%{nil}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-rpm-macros-20220106.80d3756/macros/010-common-defs 
new/python-rpm-macros-20220610.6dc4cb8/macros/010-common-defs
--- old/python-rpm-macros-20220106.80d3756/macros/010-common-defs       
2022-01-06 09:15:09.000000000 +0100
+++ new/python-rpm-macros-20220610.6dc4cb8/macros/010-common-defs       
2022-06-10 17:51:52.000000000 +0200
@@ -107,14 +107,18 @@
 
 ##### Python Unittest macros #####
 
-%pyunittest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 %{lua:\
+%pyunittest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 \
+%python_flavored_alternatives \
+%{lua:\
     local args = rpm.expand("%**"); \
     local broot = rpm.expand("%buildroot"); \
     local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. 
broot .. "%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 $python -m unittest "; \
     print(rpm.expand(intro .. args .. "}")) \
 }
 
-%pyunittest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 %{lua:\
+%pyunittest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 \
+%python_flavored_alternatives \
+%{lua:\
     local args = rpm.expand("%**"); \
     local broot = rpm.expand("%buildroot"); \
     local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. 
broot .. "%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1 $python -m unittest "; \
@@ -123,7 +127,9 @@
 
 ##### Pytest macros #####
 
-%pytest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) 
%{lua:\
+%pytest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) \
+%python_flavored_alternatives \
+%{lua:\
     local args = rpm.expand("%**"); \
     local broot = rpm.expand("%buildroot"); \
     local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. 
broot .. "%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 "; \
@@ -132,7 +138,9 @@
     print(rpm.expand(intro .. args .. "}")) \
 }
 
-%pytest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 %{lua:\
+%pytest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 \
+%python_flavored_alternatives \
+%{lua:\
     local args = rpm.expand("%**"); \
     local broot = rpm.expand("%buildroot"); \
     local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. 
broot .. "%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1 "; \

Reply via email to